Cygwin: fix up proc_subproc flags and matching pinfo methods
After patch 23a779bf3d
"Cygwin: pinfo: stop remember doing reattach",
PROC_ADDCHILD actually just sets up a new child, mirroring
PROC_DETACHED_CHILD. The actual attaching of the child is
performed by action PROC_REATTACH_CHILD or pinfo::reattach
respectively.
To better reflect what's going on, rename PROC_REATTACH_CHILD
to PROC_ATTACH_CHILD and rename pinfo::reattach to pinfo::attach.
For better readability change PROC_ADDCHILD to PROC_ADD_CHILD.
Fix comments accordingly.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -187,18 +187,18 @@ public:
|
||||
void preserve () { destroy = false; }
|
||||
void allow_remove () { destroy = true; }
|
||||
#ifndef SIG_BAD_MASK // kludge to ensure that sigproc.h included
|
||||
// int reattach () {system_printf ("reattach is not here"); return 0;}
|
||||
// int attach () {system_printf ("attach is not here"); return 0;}
|
||||
// int remember (bool) {system_printf ("remember is not here"); return 0;}
|
||||
#else
|
||||
int reattach ()
|
||||
int attach ()
|
||||
{
|
||||
int res = proc_subproc (PROC_REATTACH_CHILD, (uintptr_t) this);
|
||||
int res = proc_subproc (PROC_ATTACH_CHILD, (uintptr_t) this);
|
||||
destroy = res ? false : true;
|
||||
return res;
|
||||
}
|
||||
int remember (bool detach)
|
||||
{
|
||||
int res = proc_subproc (detach ? PROC_DETACHED_CHILD : PROC_ADDCHILD,
|
||||
int res = proc_subproc (detach ? PROC_DETACHED_CHILD : PROC_ADD_CHILD,
|
||||
(uintptr_t) this);
|
||||
destroy = res ? false : true;
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user