From 96e1b38586e80a0f014038bf4fdf4689c668fbd6 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 30 Sep 2007 23:50:48 +0000 Subject: introduce and use close_on_exec_on(fd). -50 bytes. --- shell/lash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/lash.c') diff --git a/shell/lash.c b/shell/lash.c index 5ba490f2a..af3a8f80b 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -576,7 +576,7 @@ static int setup_redirects(struct child_prog *prog, int squirrel[]) if (openfd != redir->fd) { if (squirrel && redir->fd < 3) { squirrel[redir->fd] = dup(redir->fd); - fcntl(squirrel[redir->fd], F_SETFD, FD_CLOEXEC); + close_on_exec_on(squirrel[redir->fd]); } dup2(openfd, redir->fd); close(openfd); -- cgit v1.2.3