Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH 2/6] Automatically close stderr pipes created by run_command

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:14

Possibly related (same subject, not in this thread)

Johannes Sixt [off-list ref] writes:
... 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.
Ok, sold.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help