fixup relation between lksh and mksh (somewhat minimal delta)

This commit is contained in:
tg
2017-02-18 02:33:15 +00:00
parent 18051b7e8a
commit 2584cd0634
9 changed files with 91 additions and 197 deletions

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.322 2017/02/18 01:27:24 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.323 2017/02/18 02:33:11 tg Exp $");
#if HAVE_KILLPG
/*
@ -2809,7 +2809,6 @@ c_exec(const char **wp MKSH_A_UNUSED)
for (i = 0; i < NUFILE; i++) {
if (e->savefd[i] > 0)
close(e->savefd[i]);
#ifndef MKSH_LEGACY_MODE
/*
* keep all file descriptors > 2 private for ksh,
* but not for POSIX or legacy/kludge sh
@ -2817,7 +2816,6 @@ c_exec(const char **wp MKSH_A_UNUSED)
if (!Flag(FPOSIX) && !Flag(FSH) && i > 2 &&
e->savefd[i])
fcntl(i, F_SETFD, FD_CLOEXEC);
#endif
}
e->savefd = NULL;
}