aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-12-27 17:19:25 +0000
committerChristopher Faylor <me@cgf.cx>2004-12-27 17:19:25 +0000
commit6e3c97b14e9b4f0288a39d5df2bd486ad57ae7e2 (patch)
treee531584fcb4ede899a8e756e7f5e2378c0fecb3e /winsup
parent933673e83be8bebaf0c3b7646c6119d1acd5fc05 (diff)
downloadnewlib-6e3c97b14e9b4f0288a39d5df2bd486ad57ae7e2.zip
newlib-6e3c97b14e9b4f0288a39d5df2bd486ad57ae7e2.tar.gz
newlib-6e3c97b14e9b4f0288a39d5df2bd486ad57ae7e2.tar.bz2
* pinfo.cc (_pinfo::exit): Beef up debugging output.
* sigproc.cc (proc_subproc): Detached children apparently need a ppid of 1.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/pinfo.cc8
-rw-r--r--winsup/cygwin/sigproc.cc2
3 files changed, 11 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 76b96eb..0a483f1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-27 Christopher Faylor <cgf@timesys.com>
+
+ * pinfo.cc (_pinfo::exit): Beef up debugging output.
+ * sigproc.cc (proc_subproc): Detached children apparently need a ppid
+ of 1.
+
2004-12-26 Christopher Faylor <cgf@timesys.com>
* init.cc (dll_entry): Previous code reversion was ill-advised. Revert
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 5d56fc4..1137575 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -121,15 +121,15 @@ _pinfo::exit (UINT n, bool norecord)
if (!norecord)
{
process_state = PID_EXITED;
- /* We could just let this happen automatically when the process
- exits but this should gain us a microsecond or so by notifying
- the parent early. */
+ /* Ensure that the parent knows that this logical process has
+ terminated. */
myself->alert_parent (0);
}
}
- sigproc_printf ("Calling ExitProcess %d", n);
+ sigproc_printf ("Calling ExitProcess norecord %d, n %d, exitcode %d",
+ norecord, n, exitcode);
_my_tls.stacklock = 0;
_my_tls.stackptr = _my_tls.stack;
ExitProcess (exitcode);
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index b5a2815..6ec9a28 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -249,7 +249,7 @@ proc_subproc (DWORD what, DWORD val)
case PROC_DETACHED_CHILD:
if (vchild != myself)
{
- vchild->ppid = myself->pid;
+ vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid;
vchild->uid = myself->uid;
vchild->gid = myself->gid;
vchild->pgid = myself->pgid;