Re: [PATCH v2 4/6] run-command: don't die in child when duping /dev/null

2017-04-13 Thread Brandon Williams
On 04/13, Eric Wong wrote: > Brandon Williams wrote: > > @@ -487,7 +483,7 @@ int start_command(struct child_process *cmd) > > atexit(notify_parent); > > > > if (cmd->no_stdin) > > - dup_devnull(0); > > + dup2(null_fd, 0); > > I prefer

Re: [PATCH v2 4/6] run-command: don't die in child when duping /dev/null

2017-04-13 Thread Eric Wong
Brandon Williams wrote: > @@ -487,7 +483,7 @@ int start_command(struct child_process *cmd) > atexit(notify_parent); > > if (cmd->no_stdin) > - dup_devnull(0); > + dup2(null_fd, 0); I prefer we keep error checking for dup2 failu

[PATCH v2 4/6] run-command: don't die in child when duping /dev/null

2017-04-13 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/run-command.c b/run-command.c index 5e2a03145..6751b8319 100644 --- a/run-command.c +++ b/run-command.c @@ -117,18 +117,6 @@ static inline void clos