# HG changeset patch # User Karl Heuer # Date 765152367 0 # Node ID e095c5efe2e0f6f17935cf9db58564ed7b2f8d31 # Parent b872dcd6cbbd734a930a7b7cc32b36570e7e0137 (child_setup): Check out==err when relocating fds. diff -r b872dcd6cbbd -r e095c5efe2e0 src/callproc.c --- a/src/callproc.c Thu Mar 31 22:01:12 1994 +0000 +++ b/src/callproc.c Thu Mar 31 22:19:27 1994 +0000 @@ -646,8 +646,13 @@ started with its standard in, out, or error closed, as might happen under X. */ in = relocate_fd (in, 3); - out = relocate_fd (out, 3); - err = relocate_fd (err, 3); + if (out == err) + err = out = relocate_fd (out, 3); + else + { + out = relocate_fd (out, 3); + err = relocate_fd (err, 3); + } close (0); close (1);