From b66dba56c5f076c992f9dfc0f8f9dae29d1e9500 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 6 May 2011 19:13:22 +0000 Subject: [PATCH] * fhandler.h (fhandler_dev_dsp): Cosmetic change. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Put back Sleep(10) for tty_master case. * sigproc.cc (stopped_or_terminated): Don't consider a pid which has been reaped to be terminated. --- winsup/cygwin/ChangeLog | 10 ++++++++++ winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_tty.cc | 5 ++++- winsup/cygwin/sigproc.cc | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7a9741690..d04e8c2ad 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,13 @@ +2011-05-06 Christopher Faylor + + * fhandler.h (fhandler_dev_dsp): Cosmetic change. + + * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Put back + Sleep(10) for tty_master case. + + * sigproc.cc (stopped_or_terminated): Don't consider a pid which has + been reaped to be terminated. + 2011-05-06 Yaakov Selkowitz * sysconf.cc (sysinfo): New function. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 2dcbd9d8f..1c066ff64 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1389,8 +1389,8 @@ class fhandler_dev_dsp: public fhandler_base private: void close_audio_in (); void close_audio_out (bool immediately = false); - size_t size () const { return sizeof (*this);} bool use_archetype () const {return true;} + size_t size () const { return sizeof (*this);} }; class fhandler_virtual : public fhandler_base diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 42e539191..5665fc845 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -312,7 +312,10 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on goto out; if (is_tty_master ()) - continue; + { + Sleep (10); + continue; + } if (is_nonblocking ()) { diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 8a6559f55..43655dc4c 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1022,7 +1022,7 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child) int terminated; - if (!((terminated = (child->process_state & (PID_REAPED | PID_EXITED))) + if (!((terminated = (child->process_state == PID_EXITED)) || ((w->options & WCONTINUED) && child->stopsig == SIGCONT) || ((w->options & WUNTRACED) && child->stopsig && child->stopsig != SIGCONT))) return false; -- 2.43.5