diff options
author | Christopher Faylor <cgf@redhat.com> | 2004-11-24 05:48:28 +0000 |
---|---|---|
committer | Christopher Faylor <cgf@redhat.com> | 2004-11-24 05:48:28 +0000 |
commit | 721f24da41302a9a98c81476cf4247c386f480ad (patch) | |
tree | 466e80315f518eb5f5dab2a34dd55d50ade6e582 /winsup/cygwin/pinfo.h | |
parent | b672e14da40309c3dc402cb605ca5150d812f6ad (diff) | |
download | gdb-noreparent.tar.gz |
* child_info.h (child_info_spawn::hexec_proc): Eliminate.noreparentcvs/noreparent
* dcrt0.cc (dll_crt0_0): Remove hexec_proc stuff.
* fork.cc (fork_child): Remove call to pinfo_fixup_after_fork.
* pinfo.cc (set_myself): Close and zero pid_handle if set.
(pinfo_fixup_after_fork): Delete.
(proc_waiter): Don't close vchild.hProcess here. Do that when we are remove
the vchild from procs. Save hProcess as pid_handle only on first reparent
operation.
(pinfo::wait): Don't set pid_handle here.
(pinfo::alert_parent): Always try to send signal. If unsuccessful then close
and zero wr_proc_pipe.
* pinfo.h (pinfo::pinfo): Make sure that appropriate parts of the class are
zeroed on construction.
(pinfo::alert_parent): Take char argument.
(pinfo_fixup_after_fork): Delete declaration.
(hexec_proc): Ditto.
* sigproc.cc (remove_proc): Close pid_handle and hProcess if appropriate.
* spawn.cc (spawn_guts): Set cygheap->pid_handle on first exec.
Diffstat (limited to 'winsup/cygwin/pinfo.h')
-rw-r--r-- | winsup/cygwin/pinfo.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 8c4784d9dcc..b062934da8f 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -131,9 +131,9 @@ public: HANDLE pid_handle; void init (pid_t, DWORD, HANDLE = NULL) __attribute__ ((regparm(3))); pinfo () {} - pinfo (_pinfo *x): procinfo (x) {} - pinfo (pid_t n) {init (n, 0);} - pinfo (pid_t n, DWORD flag) {init (n, flag);} + 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);} void release (); int wait () __attribute__ ((regparm (1))); ~pinfo () @@ -153,7 +153,7 @@ public: operator _pinfo * () const {return procinfo;} // operator bool () const {return (int) h;} void preserve () { destroy = false; } - void alert_parent (int); + void alert_parent (char); #ifndef _SIGPROC_H int remember () {system_printf ("remember is not here"); return 0;} #else @@ -213,9 +213,6 @@ extern pinfo myself; #define _P_VFORK 0 #define _P_SYSTEM 512 -extern void __stdcall pinfo_fixup_after_fork (); -extern HANDLE hexec_proc; - /* For mmaps across fork(). */ int __stdcall fixup_mmaps_after_fork (HANDLE parent); /* for shm areas across fork (). */ |