diff options
author | Christopher Faylor <me@cgf.cx> | 2004-01-21 06:28:35 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-01-21 06:28:35 +0000 |
commit | bcb4223cbc9de4519eefa039d142dd91df3c8318 (patch) | |
tree | e8325ef1f57b6ae10bd03618fe6de1e9e7c4a566 /winsup/cygwin/sigproc.cc | |
parent | 1284fa137fafa9b8f4ea5539044b4cf7537a026f (diff) | |
download | cygnal-bcb4223cbc9de4519eefa039d142dd91df3c8318.tar.gz cygnal-bcb4223cbc9de4519eefa039d142dd91df3c8318.tar.bz2 cygnal-bcb4223cbc9de4519eefa039d142dd91df3c8318.zip |
* fhandler_tty.cc (fhandler_tty::ioctl): Semi-revert 2003-09-26 change for
TIOCSWINSZ. It is not an error for ioctl_request_event to be missing.
* sigproc.cc (pending_signals::save): New function.
(pending_signals::restore): Ditto.
(sig_clear): Save/restore current queue pointer.
(wait_sig): Delete signals marked as such.
* sigproc.h (__SIGDELETE): New enum.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 56aa2805b..6471665bf 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -61,6 +61,8 @@ public: void add (sigpacket&); void del (); sigpacket *next (); + sigpacket *save () const {return curr;} + void restore (sigpacket *saved) {curr = saved;} friend int __stdcall sig_dispatch_pending (); }; @@ -543,14 +545,16 @@ sig_clear (int target_sig) sig_send (myself, -target_sig); else { - sigqueue.reset (); sigpacket *q; + sigpacket *save = sigqueue.save (); + sigqueue.reset (); while ((q = sigqueue.next ())) if (q->si.si_signo == target_sig) { - sigqueue.del (); + q->si.si_signo = __SIGDELETE; break; } + sigqueue.restore (save); } return; } @@ -1166,7 +1170,7 @@ wait_sig (VOID *self) case __SIGFLUSH: sigqueue.reset (); while ((q = sigqueue.next ())) - if (q->process () > 0) + if (q->si.si_signo == __SIGDELETE || q->process () > 0) sigqueue.del (); break; default: |