diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2014-07-10 16:38:35 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2014-07-10 16:38:35 +0000 |
commit | a5a81f0310e79b63f47c88ff7e7b96348b5ee5f9 (patch) | |
tree | e28f6d3fb8177c4eeb6accb1715e4e1ae65453e3 | |
parent | 4572fe4e736496045a99183693decb0bca2cc6c8 (diff) | |
download | illumos-joyent-20140710.tar.gz |
OS-3190 on ubuntu 14 cmd not found gives Fatal Python error: Failed to open /dev/urandom and core dump20140710release-20140710
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/ioctl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/ioctl.c b/usr/src/lib/brand/lx/lx_brand/common/ioctl.c index e4c3d95af4..a3b8f3b491 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/ioctl.c +++ b/usr/src/lib/brand/lx/lx_brand/common/ioctl.c @@ -558,6 +558,17 @@ lx_ioctl(uintptr_t p1, uintptr_t p2, uintptr_t p3) return (-errno); /* errno already set. */ } + /* Generic handling for FIOCLEX and FIONCLEX */ + if (cmd == LX_FIOCLEX) { + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + return (-errno); + return (0); + } else if (cmd == LX_FIONCLEX) { + if (fcntl(fd, F_SETFD, 0) == -1) + return (-errno); + return (0); + } + switch (stat.st_mode & S_IFMT) { default: break; |