diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-06-26 13:07:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-06-26 14:14:05 +0200 |
commit | 32e1f239b3b8f04c8f26c80ea87c978040c122bf (patch) | |
tree | c3fbdf930782559737d621a9f07c999045b6bfd7 /src/select.c | |
parent | 2a68c7c8cd2eca65c58c0898d0e1716e9d4c3ecd (diff) |
merge process.[ch] with application.[ch]
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c index 4ea95362..4b002ae5 100644 --- a/src/select.c +++ b/src/select.c @@ -47,6 +47,15 @@ int osmo_fd_register(struct osmo_fd *fd) if (flags < 0) return flags; + /* set close-on-exec flag */ + flags = fcntl(fd->fd, F_GETFD); + if (flags < 0) + return flags; + flags |= FD_CLOEXEC; + flags = fcntl(fd->fd, F_SETFD, flags); + if (flags < 0) + return flags; + /* Register FD */ if (fd->fd > maxfd) maxfd = fd->fd; |