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:
Corinna Vinschen
2020-08-27 21:38:50 +02:00
parent 49a9ffdf4b
commit 0a31ad6f4c
5 changed files with 15 additions and 14 deletions

View File

@@ -869,7 +869,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
postfork (child);
if (mode == _P_DETACH
? !child.remember (true)
: !(child.remember (false) && child.reattach ()))
: !(child.remember (false) && child.attach ()))
{
/* FIXME: Child in strange state now */
CloseHandle (pi.hProcess);