diff options
author | Chris Dunlap <[email protected]> | 2016-03-01 12:23:55 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-03-08 17:46:41 -0800 |
commit | 048bb5bd4950b9cb5368ed93d273f0f36e439122 (patch) | |
tree | 69f13db478b1c730a8fb9907bf47bc2cd5fadb90 /config/kernel-dirty-inode.m4 | |
parent | 272be6834c3989f13c51f65eba6ec1d776a0ad43 (diff) |
Ensure zed _finish_daemonize() leaves fds 0-2 open
In zed's _finish_daemonize(), /dev/null is open()d onto a temporary
file descriptor which is then dup()d onto stdin, stdout, and stderr.
But if file descriptors 0, 1, or 2 are not already open at the start
of this function, then the temporary file descriptor will fall within
this range and be inadvertently closed when the function cleans up.
This commit adds a check to prevent inadvertently closing this
(presumably temporary) file descriptor when it shouldn't.
Signed-off-by: Chris Dunlap <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4384
Diffstat (limited to 'config/kernel-dirty-inode.m4')
0 files changed, 0 insertions, 0 deletions