git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Mingw: verify both ends of the pipe () call

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 28, 2015, 08:07 UTC
Message-ID
<55E016CE.3070009@kdbg.org>
In-Reply-To
<20150827215014.GA8165@google.com>
Am 27.08.2015 um 23:50 schrieb Jonathan Nieder:
Show 22 quoted lines
> Johannes Schindelin wrote:
>
>> From: jfmc <jfmcjf@gmail.com>
>
> This means the name shown by git shortlog would be jfmc instead of
> Jose F. Morales.  Intended?
>
>> The code to open and test the second end of the pipe clearly imitates
>> the code for the first end. A little too closely, though... Let's fix
>> the obvious copy-edit bug.
>>
>> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>> ---
>>   compat/mingw.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> This is an old one --- more than 5 years old (since v1.7.0-rc0~86^2~4
> "Windows: simplify the pipe(2) implementation", 2010-01-15).  Thanks
> for catching it.
Ouch! Thanks for cleaning up the mess I left behind.
-- Hannes
Show 20 quoted lines
>
> Regards,
> Jonathan
>
> (patch kept unsnipped for reference)
>
>> diff --git a/compat/mingw.c b/compat/mingw.c
>> index 496e6f8..f74da23 100644
>> --- a/compat/mingw.c
>> +++ b/compat/mingw.c
>> @@ -681,7 +681,7 @@ int pipe(int filedes[2])
>>   		return -1;
>>   	}
>>   	filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
>> -	if (filedes[0] < 0) {
>> +	if (filedes[1] < 0) {
>>   		close(filedes[0]);
>>   		CloseHandle(h[1]);
>>   		return -1;
>>
Previous: Jonathan NiederNext: Johannes Schindelin
Message 4 of 9 in “Mingw: verify both ends of the pipe () call”
  1. Mingw: verify both ends of the pipe () callJohannes Schindelin, Aug 27, 2015
  2. Johannes SchindelinAug 27, 2015
  3. Jonathan NiederAug 27, 2015
  4. Johannes SixtAug 28, 2015
  5. Johannes SchindelinAug 28, 2015
  6. Mingw: verify both ends of the pipe () callJohannes Schindelin, Aug 28, 2015
  7. Junio C HamanoAug 28, 2015
  8. Johannes SchindelinAug 28, 2015
  9. Johannes SchindelinAug 28, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.