Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-21 09:28:35 +0300
committerChristopher Faylor <me@cgf.cx>2004-01-21 09:28:35 +0300
commitbcb4223cbc9de4519eefa039d142dd91df3c8318 (patch)
treee8325ef1f57b6ae10bd03618fe6de1e9e7c4a566
parent1284fa137fafa9b8f4ea5539044b4cf7537a026f (diff)
* 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.
-rw-r--r--winsup/cygwin/ChangeLog14
-rw-r--r--winsup/cygwin/fhandler_tty.cc16
-rw-r--r--winsup/cygwin/sigproc.cc10
-rw-r--r--winsup/cygwin/sigproc.h3
4 files changed, 32 insertions, 11 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e33b293d2..1ed2d4e79 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,17 @@
+2004-01-21 Christopher Faylor <cgf@redhat.com>
+
+ * 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.
+
+2004-01-20 Christopher Faylor <cgf@redhat.com>
+
+ * 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.
+
2004-01-20 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 8.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 33c7f379d..4ca8de269 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1,6 +1,6 @@
/* fhandler_tty.cc
- Copyright 1997, 1998, 2000, 2001, 2002, 2003 Red Hat, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
This file is part of Cygwin.
@@ -1102,17 +1102,19 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
|| get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
{
- if (!ioctl_request_event)
- get_ttyp ()->ioctl_retval = -EINVAL;
- else
+ get_ttyp ()->arg.winsize = *(struct winsize *) arg;
+ if (ioctl_request_event)
{
- get_ttyp ()->arg.winsize = *(struct winsize *) arg;
+ get_ttyp ()->ioctl_retval = -EINVAL;
SetEvent (ioctl_request_event);
+ }
+ else
+ {
get_ttyp ()->winsize = *(struct winsize *) arg;
killsys (-get_ttyp ()->getpgid (), SIGWINCH);
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
}
+ if (ioctl_done_event)
+ WaitForSingleObject (ioctl_done_event, INFINITE);
}
break;
case TIOCLINUX:
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:
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 03ee1b89b..9c9608901 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -22,7 +22,8 @@ enum
__SIGFLUSH = -(NSIG + 1),
__SIGSTRACE = -(NSIG + 2),
__SIGCOMMUNE = -(NSIG + 3),
- __SIGPENDING = -(NSIG + 4)
+ __SIGPENDING = -(NSIG + 4),
+ __SIGDELETE = -(NSIG + 5)
};
#endif