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