Cygwin: close_all_files: Do not duplicate stderr for write pipe.
- Currently, the stderr handle is duplicated in close_all_files().
This interferes the handle counting for detecting closure of read
pipe, which is introduced by commit f79a4611. This patch stops
duplicating stderr handle if it is write pipe.
This commit is contained in:
parent
18fab2f834
commit
350806f882
|
|
@ -95,7 +95,7 @@ close_all_files (bool norelease)
|
|||
if (cfd >= 0)
|
||||
{
|
||||
debug_only_printf ("closing fd %d", i);
|
||||
if (i == 2)
|
||||
if (i == 2 && cfd->get_dev () != FH_PIPEW)
|
||||
DuplicateHandle (GetCurrentProcess (), cfd->get_output_handle (),
|
||||
GetCurrentProcess (), &h,
|
||||
0, false, DUPLICATE_SAME_ACCESS);
|
||||
|
|
|
|||
Loading…
Reference in New Issue