ukernel: set close-on-exec on our socket

if the process we are in execs a child, it doesn't get our socket

Change-Id: Iaf1831866e0dcda0449e75d89c576557c61090dd
Reviewed-on: http://gerrit.openafs.org/5598
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Derrick Brashear 2011-10-11 14:32:04 -04:00
parent f722a75fe2
commit 87dcfc872c

View File

@ -257,6 +257,10 @@ rxk_InitializeSocket(void)
usr_assert(rc == 0);
#endif /* AFS_USR_AIX_ENV */
#ifdef FD_CLOEXEC
fcntl(sock, F_SETFD, FD_CLOEXEC);
#endif
usockp->sock = sock;
usockp->port = lcladdr.sin_port;