diff options
| author | Karl Heuer | 1994-03-31 22:19:27 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-31 22:19:27 +0000 |
| commit | 3e9367e7decfabe3d62aebd73d9e2848ee05d753 (patch) | |
| tree | 4c73720f9144044a03a746b746b5e11db0aebb06 /src | |
| parent | 58732bd4aa6015e8ae37baaf1ca7a2572a71ea59 (diff) | |
| download | emacs-3e9367e7decfabe3d62aebd73d9e2848ee05d753.tar.gz emacs-3e9367e7decfabe3d62aebd73d9e2848ee05d753.zip | |
(child_setup): Check out==err when relocating fds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c index bce5b505df3..9bf6d23b9ac 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -646,8 +646,13 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) | |||
| 646 | started with its standard in, out, or error closed, as might | 646 | started with its standard in, out, or error closed, as might |
| 647 | happen under X. */ | 647 | happen under X. */ |
| 648 | in = relocate_fd (in, 3); | 648 | in = relocate_fd (in, 3); |
| 649 | out = relocate_fd (out, 3); | 649 | if (out == err) |
| 650 | err = relocate_fd (err, 3); | 650 | err = out = relocate_fd (out, 3); |
| 651 | else | ||
| 652 | { | ||
| 653 | out = relocate_fd (out, 3); | ||
| 654 | err = relocate_fd (err, 3); | ||
| 655 | } | ||
| 651 | 656 | ||
| 652 | close (0); | 657 | close (0); |
| 653 | close (1); | 658 | close (1); |