diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-23 11:13:23 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-23 11:13:23 +0000 |
commit | 40514a0309939f2446f0d4ed9600cad5de396e7f (patch) | |
tree | 0f5f4a57d4bb7893418b5bb11d482858eb17ba8b /mailutils/mail.c | |
parent | 9db164d6e39050d09f38288c6045cd2a2cbf6d63 (diff) | |
parent | c0cae52662ccced9df19f19ec94238d1b1e3bd71 (diff) | |
download | busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.tar.gz busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.tar.bz2 busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.zip |
Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into merge
Conflicts:
Makefile.flags
scripts/basic/fixdep.c
Diffstat (limited to 'mailutils/mail.c')
-rw-r--r-- | mailutils/mail.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mailutils/mail.c b/mailutils/mail.c index 66c79471f..f5260d9db 100644 --- a/mailutils/mail.c +++ b/mailutils/mail.c | |||
@@ -57,10 +57,13 @@ void FAST_FUNC launch_helper(const char **argv) | |||
57 | G.helper_pid = xvfork(); | 57 | G.helper_pid = xvfork(); |
58 | 58 | ||
59 | i = (!G.helper_pid) * 2; // for parent:0, for child:2 | 59 | i = (!G.helper_pid) * 2; // for parent:0, for child:2 |
60 | close(pipes[i + 1]); // 1 or 3 - closing one write end | 60 | close(pipes[i + 1]); // 1 or 3 - closing one write end |
61 | close(pipes[2 - i]); // 2 or 0 - closing one read end | 61 | close(pipes[2 - i]); // 2 or 0 - closing one read end |
62 | xmove_fd(pipes[i], STDIN_FILENO); // 0 or 2 - using other read end | 62 | xmove_fd(pipes[i], STDIN_FILENO); // 0 or 2 - using other read end |
63 | xmove_fd(pipes[3 - i], STDOUT_FILENO); // 3 or 1 - other write end | 63 | xmove_fd(pipes[3 - i], STDOUT_FILENO); // 3 or 1 - using other write end |
64 | // End result: | ||
65 | // parent stdout [3] -> child stdin [2] | ||
66 | // child stdout [1] -> parent stdin [0] | ||
64 | 67 | ||
65 | if (!G.helper_pid) { | 68 | if (!G.helper_pid) { |
66 | // child: try to execute connection helper | 69 | // child: try to execute connection helper |