* fork.cc (fork_parent): Reinstate "childhProc" protection. Don't close
hProcess handle here since it is used to ensure that a new process isn't created with the old pid after the old pid exits. * spawn.cc (spawn_guts): Ditto. * pinfo.cc (proc_waiter): Don't send any signals if we've execed since this process doesn't officially exist. * pinfo.h (pinfo::pid_handle): Eliminate. Just use hProc. * sigproc.cc (sig_send): Don't send any signals if our sendsig doesn't exist. That's a sign that we are execing. (remove_proc): Eliminate pid_handle close.
This commit is contained in:
@@ -136,13 +136,12 @@ public:
|
||||
HANDLE hProcess;
|
||||
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) {}
|
||||
pinfo (pid_t n) : rd_proc_pipe (NULL), hProcess (NULL), pid_handle (NULL) {init (n, 0);}
|
||||
pinfo (pid_t n, DWORD flag) : rd_proc_pipe (NULL), hProcess (NULL), pid_handle (NULL) {init (n, flag);}
|
||||
pinfo (_pinfo *x): procinfo (x), hProcess (NULL) {}
|
||||
pinfo (pid_t n) : rd_proc_pipe (NULL), hProcess (NULL) {init (n, 0);}
|
||||
pinfo (pid_t n, DWORD flag) : rd_proc_pipe (NULL), hProcess (NULL) {init (n, flag);}
|
||||
void release ();
|
||||
int wait () __attribute__ ((regparm (1)));
|
||||
~pinfo ()
|
||||
|
Reference in New Issue
Block a user