close-on-exec handles are left open by exec parent

egor duda
Thu Aug 2 07:40:00 GMT 2001


  here's the proposed patch. it also contains a fix FreeConsole ()
related bug -- when cygwin application frees its console,
"process_input" thread may be still running. When console is closed,
WaitForMultipleObjects () with console handle returns WAIT_FAILED, so
"process_input" thread starts cycling and eating CPU.

egor.   icq 5165414 fidonet 2:5020/496.19

-------------- next part --------------
2001-08-02  Egor Duda  <>

	* (spawn_guts): In exec parent, wait for child to perfom
	all handle fixups, and then close all files.
	* (dtable::fixup_after_exec): Signal parent that fixup
	is complete.
	* dtable.h: Define "fixup complete" event name.
	* (process_input): Stop processing when master
	returns read error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: close-on-exec.diff
Type: text/x-diff
Size: 3140 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list