version 1.468, 2017/10/27 01:57:06 |
version 1.469, 2017/11/01 00:04:15 |
|
|
* NB. this can only happen after LocalCommand has completed, |
* NB. this can only happen after LocalCommand has completed, |
* as it may want to write to stdout. |
* as it may want to write to stdout. |
*/ |
*/ |
if ((devnull = open(_PATH_DEVNULL, O_WRONLY)) == -1) |
if (!need_controlpersist_detach) { |
error("%s: open %s: %s", __func__, |
if ((devnull = open(_PATH_DEVNULL, O_WRONLY)) == -1) |
_PATH_DEVNULL, strerror(errno)); |
error("%s: open %s: %s", __func__, |
if (dup2(devnull, STDOUT_FILENO) < 0) |
_PATH_DEVNULL, strerror(errno)); |
fatal("%s: dup2() stdout failed", __func__); |
if (dup2(devnull, STDOUT_FILENO) < 0) |
if (devnull > STDERR_FILENO) |
fatal("%s: dup2() stdout failed", __func__); |
close(devnull); |
if (devnull > STDERR_FILENO) |
|
close(devnull); |
|
} |
|
|
/* |
/* |
* If requested and we are not interested in replies to remote |
* If requested and we are not interested in replies to remote |