Mingw: verify both ends of the pipe () call

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>
This commit is contained in:
jfmc
2015-08-23 01:10:35 +02:00
committed by Jose F. Morales
parent 10ca1f73c1
commit e57fa5fc1f

View File

@@ -896,7 +896,7 @@ int pipe(int filedes[2])
return -1;
}
filedes[1] = _open_osfhandle(HCAST(int, h[1]), O_NOINHERIT);
if (filedes[0] < 0) {
if (filedes[1] < 0) {
close(filedes[0]);
CloseHandle(h[1]);
return -1;