summaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-09-30 23:50:48 +0000
committerDenis Vlasenko2007-09-30 23:50:48 +0000
commit96e1b38586e80a0f014038bf4fdf4689c668fbd6 (patch)
treed7f6a7866700601598cfcc006b7dcb6cb4a7c07e /networking/nc.c
parentdeabacdf91c6d1c3cfcdb4cd06780807193de81d (diff)
downloadbusybox-96e1b38586e80a0f014038bf4fdf4689c668fbd6.zip
busybox-96e1b38586e80a0f014038bf4fdf4689c668fbd6.tar.gz
introduce and use close_on_exec_on(fd). -50 bytes.
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/nc.c b/networking/nc.c
index e7bd519..19750e5 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)