Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-25 06:27:42 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-25 06:27:42 +0400
commit239b06b864b0231e9995e2279af850362910872f (patch)
tree54156b2a5e8e3bbbd5dd0117e607570edd1f4e1f /winsup
parent4bb85e7f6720e5cfa362b985527e922a6047a1e4 (diff)
* 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.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/external.cc5
-rw-r--r--winsup/cygwin/include/sys/cygwin.h3
-rw-r--r--winsup/cygwin/sigproc.cc12
5 files changed, 23 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 6f7de33e8..075cbade1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 20005d3e2..95b0a5720 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -1042,7 +1042,7 @@ do_exit (int status)
}
if (cleanup_pinfo)
- myself->record_death (); // Locks pinfo mutex
+ myself->record_death ();
else
sigproc_printf ("not cleanup_pinfo");
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 1ecbf14cf..566293b63 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -15,6 +15,7 @@ details. */
#include "sync.h"
#include "sigproc.h"
#include "pinfo.h"
+#include <exceptions.h>
static external_pinfo *
fillout_pinfo (pid_t pid, int winpid)
@@ -154,6 +155,10 @@ cygwin_internal (cygwin_getinfo_types t, ...)
case CW_GETPINFO_FULL:
return (DWORD) fillout_pinfo (va_arg (arg, pid_t), 1);
+ case CW_INIT_EXCEPTIONS:
+ init_exceptions ((exception_list *) arg);
+ return 0;
+
default:
return (DWORD) -1;
}
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index 5b6cc7011..0cbd73686 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -61,7 +61,8 @@ typedef enum
CW_USER_DATA,
CW_PERFILE,
CW_GET_CYGDRIVE_PREFIXES,
- CW_GETPINFO_FULL
+ CW_GETPINFO_FULL,
+ CW_INIT_EXCEPTIONS
} cygwin_getinfo_types;
#define CW_NEXTPID 0x80000000 // or with pid to get next one
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 45b6d20a9..102310175 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -499,7 +499,7 @@ proc_terminate (void)
zombies[i]->hProcess = NULL;
}
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 */
@@ -530,10 +530,15 @@ proc_terminate (void)
pchildren[i]->process_state |= PID_ORPHANED;
}
}
- pchildren[i].release ();
+ // pchildren[i].release (); // FIXME: this breaks older gccs for some reason
}
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
* non-raceable manner.
*/
@@ -541,8 +546,9 @@ proc_terminate (void)
if (m)
{
sync_proc_subproc = NULL;
- delete m;
+ // delete m;
}
+ #endif
}
sigproc_printf ("leaving");
}