From dde97b32ff1816f6215dfa4f7bf26f611bc8c154 Mon Sep 17 00:00:00 2001 From: Jacques Vidrine Date: Wed, 11 Sep 2002 16:38:33 +0000 Subject: [PATCH] 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. --- bin/sh/jobs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index a4a8bdf57cf..89aecea490f 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -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;