comparison src/callproc.c @ 6614:e095c5efe2e0

(child_setup): Check out==err when relocating fds.
author Karl Heuer <kwzh@gnu.org>
date Thu, 31 Mar 1994 22:19:27 +0000
parents c88f34090aea
children 6a9b0b5399ce
comparison
equal deleted inserted replaced
6613:b872dcd6cbbd 6614:e095c5efe2e0
644 /* Make sure that in, out, and err are not actually already in 644 /* Make sure that in, out, and err are not actually already in
645 descriptors zero, one, or two; this could happen if Emacs is 645 descriptors zero, one, or two; this could happen if Emacs is
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);
654 close (2); 659 close (2);
655 660