diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5fa37fb3d..ba0b9a21c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2012-08-23 Christopher Faylor + + * pinfo.cc (_pinfo::exists): Don't consider a process with no state to + exist. + 2012-08-21 Christopher Faylor * net.cc (get_adapters_addresses): Drop FIXME part of comment. diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 6d8e41356..8ac58d097 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -488,7 +488,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags) bool __stdcall _pinfo::exists () { - return this && !(process_state & (PID_EXITED | PID_REAPED | PID_EXECED)); + return this && process_state && !(process_state & (PID_EXITED | PID_REAPED | PID_EXECED)); } bool