* pinfo.h (pinfo::init): Make third parameter non-optional and propagate change

throughout.
* pinfo.cc (set_myself): Pass INVALID_HANDLE_POINTER if h is NULL.
(pinfo::init): Make third parameter non-optional.  Eliminate use of PID_EXECED
as an argument.  Put setting of handle back inside loop but reorganize to try
to open it only when necessary.
This commit is contained in:
Christopher Faylor
2005-01-26 00:15:11 +00:00
parent 72c1491bba
commit 0e32d1ffcd
4 changed files with 73 additions and 62 deletions

View File

@@ -144,11 +144,11 @@ public:
bool waiter_ready;
/* Handle associated with initial Windows pid which started it all. */
class cygthread *wait_thread;
void init (pid_t, DWORD, HANDLE = NULL) __attribute__ ((regparm(3)));
void init (pid_t, DWORD, HANDLE) __attribute__ ((regparm(3)));
pinfo () {}
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);}
pinfo (pid_t n) : rd_proc_pipe (NULL), hProcess (NULL) {init (n, 0, NULL);}
pinfo (pid_t n, DWORD flag) : rd_proc_pipe (NULL), hProcess (NULL) {init (n, flag, NULL);}
void release ();
int wait () __attribute__ ((regparm (1)));
~pinfo ()