Re: [PATCH 2/6] Automatically close stderr pipes created by run_command
Johannes Sixt <johannes.sixt@telecom.at> writes:
Show 11 quoted lines
> ... But practically in the case
> where a fd > 0 is assigned to .in/.out/.err:
>
> - case .out, .err: the caller is required to close the fd early after
> start_command() because (if this is a pipe) the child won't see EOF;
>
> - case .in: the caller must not read from the fd anyway, else the child gets
> inconsistent input.
>
> So, while there *is* some inconsistency, the inconsistent cases can be clearly
> separated into the cases fd > 0 and fd == -1.