Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Fix start_command() pipe bug when stdin is closed.

From: Karl Chen <hidden>
Date: 2016-06-15 22:45:13

quoted
quoted
quoted
quoted
On 2008-08-25 03:44 PDT, Johannes Sixt writes:
    Johannes> When I try these instructions I don't get an error;
    Johannes> instead the command runs successfully.

Weird.  I see the symptom on two machines, both 1.5.6 and tracking
master.  The 1.5.6 system installation could be interfering even
though I used PATH=/path/to/git:$PATH.

    Johannes> While I do see that there is a problem, it is only
    Johannes> half of the story, and your patch addresses only
    Johannes> this half.

    Johannes> What if stdout is closed, too? Then the ends of the
    Johannes> first allocated pipe would go to fds 0 and 1, and
    Johannes> then the pipe end at 1 would be closed by a
    Johannes> subsequent dup2(xxx, 1).

My patch was intended to fix the problem for any renaming where
fd_from==fd_to, including target stdout.  I didn't say so in the
changelog though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help