merged git 174_4.6_mandriva_pty_closeonexec

This commit is contained in:
Enrico Weigelt, metux IT service 2009-01-24 20:26:40 +01:00
commit 7fae75c0d6
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,11 @@
* src/main.c: Removed unused function do_mc_filename_rename
* src/util.c: Removed unused struct whentm
2009-01-16 Enrico Weigelt, metux IT service <weigelt@metux.de>
* src/subshell: setting subshell pty to close-on-exec
(taken from mandriva patches)
2009-01-14 Slava Zanko <slavazanko@gmail.com>
* lib/mc.ext.in: change filemask for recognize 7z-files

View File

@ -1110,6 +1110,7 @@ pty_open_slave (const char *pty_name)
#endif /* I_FIND && I_PUSH */
#endif /* __osf__ || __linux__ */
fcntl(pty_slave, F_SETFD, FD_CLOEXEC);
return pty_slave;
}
@ -1163,6 +1164,7 @@ pty_open_slave (const char *pty_name)
}
if ((pty_slave = open (pty_name, O_RDWR)) == -1)
fprintf (stderr, "open (pty_name, O_RDWR): %s\r\n", pty_name);
fcntl(pty_slave, F_SETFD, FD_CLOEXEC);
return pty_slave;
}