[PATCH] system-cancel part2

Thomas Pfaff tpfaff@gmx.net
Wed Jan 15 11:23:00 GMT 2003


This patch will make sure that the signal handlers that are saved in the
system call are restored even if the thread got cancelled. Since
spawn_guts uses waitpid when mode is _P_WAIT spawn_guts is a cancellation
point.

Attached is the patch and a new test case.

2003-01-15  Thomas Paff  <tpfaff@gmx.net>

	* syscalls.cc (struct system_cleanup_args): New struct.
	(system_cleanup): New function.
	(system): Use pthread_cleanup_push and _pop to save and restore
	signal handlers and sigprocmask.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: system-cancel2.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030115/a291745a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cancel11.c
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030115/a291745a/attachment.c>


More information about the Cygwin-patches mailing list