diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-03-07 19:59:17 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-03-07 19:59:17 +0000 |
commit | ff8d077d36a666cba38bf1509e4d55d8f2fd4812 (patch) | |
tree | 86fa2fb313c72c488fd3f4c0bc9c05414d4566fa /src/minutils/s6-devd.c | |
parent | 6b16f76f42abfa05226351b9566f7597b51fefa2 (diff) | |
download | s6-linux-utils-ff8d077d36a666cba38bf1509e4d55d8f2fd4812.tar.xz |
Don't redirect stdout in s6-devd
Diffstat (limited to 'src/minutils/s6-devd.c')
-rw-r--r-- | src/minutils/s6-devd.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/minutils/s6-devd.c b/src/minutils/s6-devd.c index 2e5c9ce..f51550c 100644 --- a/src/minutils/s6-devd.c +++ b/src/minutils/s6-devd.c @@ -241,15 +241,8 @@ int main (int argc, char const *const *argv, char const *const *envp) } argc -= l.ind ; argv += l.ind ; if (!argc) strerr_dieusage(100, USAGE) ; - { - int fd = open_readb("/dev/null") ; - if (fd < 0) strerr_diefu2sys(111, "open /dev/null for ", "reading") ; - if (fd_move(0, fd) < 0) strerr_diefu2sys(111, "redirect std", "in") ; - fd = open_write("/dev/null") ; - if (fd < 0) strerr_diefu2sys(111, "open /dev/null for ", "writing") ; - if (ndelay_off(fd) < 0) strerr_diefu1sys(111, "ndelay_off /dev/null") ; - if (fd_move(1, fd) < 0) strerr_diefu2sys(111, "redirect std", "out") ; - } + close(0) ; + if (open_readb("/dev/null") < 0) strerr_diefu1sys(111, "open /dev/null for reading") ; x[1].fd = netlink_init(kbufsz) ; if (x[1].fd < 0) strerr_diefu1sys(111, "init netlink") ; } |