Correct a usage of fnctl that could not be right and results in a

no-op.  I assume it was meant that the close-on-exec flag be set here.
This commit is contained in:
nectar 2002-09-11 16:38:33 +00:00
parent d748f0673d
commit 927cfce43e

View File

@ -129,7 +129,7 @@ setjobctl(int on)
if (i > 2 || (ttyfd = dup(i)) < 0)
goto out;
}
if (fcntl(ttyfd, FD_CLOEXEC, 1) < 0) {
if (fcntl(ttyfd, F_SETFD, FD_CLOEXEC) < 0) {
close(ttyfd);
ttyfd = -1;
goto out;