mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-19 07:22:14 +08:00
* cygthread.cc (cygthread::terminate_thread): Make public.
* pinfo.h (pinfo::wait_thread): New element. * pinfo.cc (pinfo::wait): Store "handle" to started thread in pinfo. * sigproc.cc (proc_terminate): Kill any threads waiting for a process pipe.
This commit is contained in:
parent
54dd79bb44
commit
f181da2707
@ -1,3 +1,11 @@
|
||||
2004-12-05 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* cygthread.cc (cygthread::terminate_thread): Make public.
|
||||
* pinfo.h (pinfo::wait_thread): New element.
|
||||
* pinfo.cc (pinfo::wait): Store "handle" to started thread in pinfo.
|
||||
* sigproc.cc (proc_terminate): Kill any threads waiting for a process
|
||||
pipe.
|
||||
|
||||
2004-12-05 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* sigproc.cc (mychild): Reimplement as list scan.
|
||||
|
@ -22,8 +22,8 @@ class cygthread
|
||||
VOID *arg;
|
||||
bool is_freerange;
|
||||
static bool exiting;
|
||||
void terminate_thread ();
|
||||
public:
|
||||
void terminate_thread ();
|
||||
static DWORD WINAPI stub (VOID *);
|
||||
static DWORD WINAPI simplestub (VOID *);
|
||||
static DWORD main_thread_id;
|
||||
|
@ -833,7 +833,7 @@ pinfo::wait ()
|
||||
sigproc_printf ("tracking thread creation failed for pid %d", (*this)->pid);
|
||||
else
|
||||
{
|
||||
h->zap_h ();
|
||||
wait_thread = h;
|
||||
sigproc_printf ("created tracking thread for pid %d, winpid %p, rd_pipe %p",
|
||||
(*this)->pid, (*this)->dwProcessId, rd_proc_pipe);
|
||||
}
|
||||
|
@ -137,6 +137,7 @@ public:
|
||||
CRITICAL_SECTION _lock;
|
||||
/* Handle associated with initial Windows pid which started it all. */
|
||||
HANDLE pid_handle;
|
||||
class cygthread *wait_thread;
|
||||
void init (pid_t, DWORD, HANDLE = NULL) __attribute__ ((regparm(3)));
|
||||
pinfo () {}
|
||||
pinfo (_pinfo *x): procinfo (x), hProcess (NULL), pid_handle (NULL) {}
|
||||
|
@ -401,6 +401,11 @@ proc_terminate (void)
|
||||
procs[i]->ppid = 1;
|
||||
if (!proc_exists (procs[i]))
|
||||
procs[i]->process_state = PID_EXITED; /* CGF FIXME - still needed? */
|
||||
if (procs[i].wait_thread)
|
||||
{
|
||||
// CloseHandle (procs[i].rd_proc_pipe);
|
||||
procs[i].wait_thread->terminate_thread ();
|
||||
}
|
||||
procs[i].release ();
|
||||
}
|
||||
nprocs = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user