aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index eb1633be2..2bf20f3a0 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -164,6 +164,11 @@ int ndelay_on(int fd)
164 return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) | O_NONBLOCK); 164 return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) | O_NONBLOCK);
165} 165}
166 166
167int close_on_exec_on(int fd)
168{
169 return fcntl(fd, F_SETFD, FD_CLOEXEC);
170}
171
167int ndelay_off(int fd) 172int ndelay_off(int fd)
168{ 173{
169 return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) & ~O_NONBLOCK); 174 return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) & ~O_NONBLOCK);