From 927cfce43ea563f6042a80a8c89cb2357e15173e Mon Sep 17 00:00:00 2001 From: nectar 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 a4a8bdf57cf7..89aecea490fb 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;