4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-31 11:30:56 +08:00

* external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin

exception handling on threads not created by cygwin.
* sigproc.cc (proc_terminate): Don't release pinfo structs since we are
exiting.
* include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
This commit is contained in:
Christopher Faylor 2000-08-25 02:27:42 +00:00
parent 4bb85e7f67
commit 239b06b864
5 changed files with 23 additions and 7 deletions

View File

@ -1,6 +1,10 @@
Thu Aug 24 18:02:35 2000 Christopher Faylor <cgf@cygnus.com> Thu Aug 24 22:17:19 2000 Christopher Faylor <cgf@cygnus.com>
* ps.cc (main): Always print a cygwin process using cygwin paths. * external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin
exception handling on threads not created by cygwin.
* sigproc.cc (proc_terminate): Don't release pinfo structs since we are
exiting.
* include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
Thu Aug 24 17:16:14 2000 Christopher Faylor <cgf@cygnus.com> Thu Aug 24 17:16:14 2000 Christopher Faylor <cgf@cygnus.com>

View File

@ -1042,7 +1042,7 @@ do_exit (int status)
} }
if (cleanup_pinfo) if (cleanup_pinfo)
myself->record_death (); // Locks pinfo mutex myself->record_death ();
else else
sigproc_printf ("not cleanup_pinfo"); sigproc_printf ("not cleanup_pinfo");

View File

@ -15,6 +15,7 @@ details. */
#include "sync.h" #include "sync.h"
#include "sigproc.h" #include "sigproc.h"
#include "pinfo.h" #include "pinfo.h"
#include <exceptions.h>
static external_pinfo * static external_pinfo *
fillout_pinfo (pid_t pid, int winpid) fillout_pinfo (pid_t pid, int winpid)
@ -154,6 +155,10 @@ cygwin_internal (cygwin_getinfo_types t, ...)
case CW_GETPINFO_FULL: case CW_GETPINFO_FULL:
return (DWORD) fillout_pinfo (va_arg (arg, pid_t), 1); return (DWORD) fillout_pinfo (va_arg (arg, pid_t), 1);
case CW_INIT_EXCEPTIONS:
init_exceptions ((exception_list *) arg);
return 0;
default: default:
return (DWORD) -1; return (DWORD) -1;
} }

View File

@ -61,7 +61,8 @@ typedef enum
CW_USER_DATA, CW_USER_DATA,
CW_PERFILE, CW_PERFILE,
CW_GET_CYGDRIVE_PREFIXES, CW_GET_CYGDRIVE_PREFIXES,
CW_GETPINFO_FULL CW_GETPINFO_FULL,
CW_INIT_EXCEPTIONS
} cygwin_getinfo_types; } cygwin_getinfo_types;
#define CW_NEXTPID 0x80000000 // or with pid to get next one #define CW_NEXTPID 0x80000000 // or with pid to get next one

View File

@ -499,7 +499,7 @@ proc_terminate (void)
zombies[i]->hProcess = NULL; zombies[i]->hProcess = NULL;
} }
zombies[i]->process_state = PID_NOT_IN_USE; /* CGF FIXME - still needed? */ zombies[i]->process_state = PID_NOT_IN_USE; /* CGF FIXME - still needed? */
zombies[i].release(); // zombies[i].release(); // FIXME: this breaks older gccs for some reason
} }
/* Disassociate my subprocesses */ /* Disassociate my subprocesses */
@ -530,10 +530,15 @@ proc_terminate (void)
pchildren[i]->process_state |= PID_ORPHANED; pchildren[i]->process_state |= PID_ORPHANED;
} }
} }
pchildren[i].release (); // pchildren[i].release (); // FIXME: this breaks older gccs for some reason
} }
nchildren = nzombies = 0; nchildren = nzombies = 0;
/* Just zero sync_proc_subproc as the delete below seems to cause
problems for older gccs. */
#if 1
sync_proc_subproc = NULL;
#else
/* Attempt to close and release sync_proc_subproc in a /* Attempt to close and release sync_proc_subproc in a
* non-raceable manner. * non-raceable manner.
*/ */
@ -541,8 +546,9 @@ proc_terminate (void)
if (m) if (m)
{ {
sync_proc_subproc = NULL; sync_proc_subproc = NULL;
delete m; // delete m;
} }
#endif
} }
sigproc_printf ("leaving"); sigproc_printf ("leaving");
} }