os-posix: use global daemon_pipe instead of cryptic fds[1]
authorMichael Tokarev <mjt@tls.msk.ru>
Thu, 30 Oct 2014 14:30:51 +0000 (17:30 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 2 Nov 2014 07:04:34 +0000 (10:04 +0300)
commit0be5e436ff2cd6b8a1ff6782e3cfd09441ff3ec7
tree552d953bbe4a70548027d8b20f3c098fe60c6744
parent08a655be71d0a130a5d9bf7816d096ec31c4f055
os-posix: use global daemon_pipe instead of cryptic fds[1]

When asked to -daemonize, we fork a child and setup a pipe between
it and parent to pass exit status.  os-posix.c used global fds[2]
array for that, but actually only the writing side of the pipe is
needed to be global, and this name is really too generic.  Use
just one interger for the writing side of the pipe, and name it
daemon_pipe to be more understandable than cryptic fds[1].

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
os-posix.c