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. --- networking/nc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking/nc.c') diff --git a/networking/nc.c b/networking/nc.c index e7bd519e0..19750e59e 100644 --- a/networking/nc.c +++ b/networking/nc.c @@ -113,7 +113,7 @@ int nc_main(int argc, char **argv) lport = get_nport(&lsa->sa); fdprintf(2, "%d\n", ntohs(lport)); } - fcntl(sfd, F_SETFD, FD_CLOEXEC); + close_on_exec_on(sfd); accept_again: cfd = accept(sfd, NULL, 0); if (cfd < 0) -- cgit v1.2.3