• unify ksh_dup2() usage, use bool where appropriate
• apply diff from mirbsdksh-1.11: #ifdef DUP2_BROKEN /* Ultrix systems like to preserve the close-on-exec flag */ ‣ XXX we do #ifdef __ultrix here (imake-style) instead of mirtoconfing it (but does anyone know of any other OS with the same problem? plus we’d see it as we now know the symptoms) • remove ultrix Build.hs warn=' but might work…' in the hope it DOES
This commit is contained in:
8
misc.c
8
misc.c
@ -6,7 +6,7 @@
|
||||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.69 2008/03/23 22:09:58 tg Exp $\t"
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.70 2008/04/01 20:40:22 tg Exp $\t"
|
||||
MKSH_SH_H_ID);
|
||||
|
||||
#undef USE_CHVT
|
||||
@ -1380,9 +1380,9 @@ chvt(const char *fn)
|
||||
errorf("chvt: setsid failed");
|
||||
if ((fn != dv + 1) && ioctl(fd, TIOCSCTTY, NULL) == -1)
|
||||
errorf("chvt: TIOCSCTTY failed");
|
||||
dup2(fd, 0);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
ksh_dup2(fd, 0, false);
|
||||
ksh_dup2(fd, 1, false);
|
||||
ksh_dup2(fd, 2, false);
|
||||
if (fd > 2)
|
||||
close(fd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user