aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-10-19 14:19:37 +0000
committerChristopher Faylor <me@cgf.cx>2005-10-19 14:19:37 +0000
commitb3982520d36f3aedbd579bfe5a9eb208c4943923 (patch)
tree1b7e351ebd5337e5f2a5a05ec6e1c0b15036ab3e /winsup/cygwin
parentb72a5c0767780b0280e145c8ad686e007fbea0a5 (diff)
downloadnewlib-b3982520d36f3aedbd579bfe5a9eb208c4943923.zip
newlib-b3982520d36f3aedbd579bfe5a9eb208c4943923.tar.gz
newlib-b3982520d36f3aedbd579bfe5a9eb208c4943923.tar.bz2
* pinfo.cc (_pinfo::dup_proc_pipe): Make warning more severe by actually
printing it. (_pinfo::alert_parent): Fix comment. Don't send to parent if we are in an exec stub.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/pinfo.cc13
2 files changed, 15 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4fa3a5e..22410fa 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-19 Christopher Faylor <cgf@timesys.com>
+
+ * pinfo.cc (_pinfo::dup_proc_pipe): Make warning more severe by
+ actually printing it.
+ (_pinfo::alert_parent): Fix comment. Don't send to parent if we are in
+ an exec stub.
+
2005-10-18 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (handle_threadlist_exception): Improve diagnostic output.
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 26d910c..1854756 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -929,7 +929,7 @@ _pinfo::dup_proc_pipe (HANDLE hProcess)
bool res = DuplicateHandle (hMainProc, wr_proc_pipe, hProcess, &wr_proc_pipe,
0, FALSE, flags);
if (!res && WaitForSingleObject (hProcess, 0) != WAIT_OBJECT_0)
- sigproc_printf ("DuplicateHandle failed, pid %d, hProcess %p, %E", pid, hProcess);
+ system_printf ("DuplicateHandle failed, pid %d, hProcess %p, %E", pid, hProcess);
else
{
wr_proc_pipe_owner = dwProcessId;
@@ -990,10 +990,13 @@ bool
_pinfo::alert_parent (char sig)
{
DWORD nb = 0;
- /* Send something to our parent. If the parent has gone away,
- close the pipe. */
- if (wr_proc_pipe == INVALID_HANDLE_VALUE
- || !myself->wr_proc_pipe)
+
+ /* Send something to our parent. If the parent has gone away, close the pipe.
+ Don't send if this is an exec stub.
+
+ FIXME: Is there a race here if we run this while another thread is attempting
+ to exec()? */
+ if (wr_proc_pipe == INVALID_HANDLE_VALUE || !myself->wr_proc_pipe || hExeced)
/* no parent */;
else
{