aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/pinfo.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-11-24 05:48:31 +0000
committerChristopher Faylor <me@cgf.cx>2004-11-24 05:48:31 +0000
commitc373c4a1f13d0814a32a7881be448c7e68e19ce9 (patch)
tree928b18c8e1bfaeb345781ac4987351f3ab028182 /winsup/cygwin/pinfo.h
parentfcba9e3c4c63a116777e9af5a03c32c94c07a97d (diff)
downloadnewlib-c373c4a1f13d0814a32a7881be448c7e68e19ce9.zip
newlib-c373c4a1f13d0814a32a7881be448c7e68e19ce9.tar.gz
newlib-c373c4a1f13d0814a32a7881be448c7e68e19ce9.tar.bz2
* child_info.h (child_info_spawn::hexec_proc): Eliminate.github/noreparentnoreparent
* 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.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index 8c4784d..b062934 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 (). */