Skip to content

Will this work if a process spawns zombie background processes #105

Description

@atlaste

If a process spawns a (detached) zombie process, I'm not sure if everything will go according to plan.

The normal behavior of running an executable, is that if it exits, you get the exit status of the process that you spawn.

However, in the coverage runner we do:

          case EXIT_PROCESS_DEBUG_EVENT:
          {
...
            // Success application must return 0 --> Commented out per PR #97.
            // executionSuccess &= (debugEvent.u.ExitProcess.dwExitCode == 0);

            processMap.erase(debugEvent.dwProcessId);
            
					  // Get only the latest RC code of latest process.
					  // Here we consider all process depends of master process which must be released at the end.
					  if( processMap.empty() )
					  {
						  executionSuccess = (debugEvent.u.ExitProcess.dwExitCode == 0);
					  }
            continueDebugging = processMap.empty() ? false : true;
          }
          break;

I'm not sure if this is correct. We might just want to check pi.dwProcessId from line 432, so:

continueDebugging = pi.dwProcessId != debugEvent.dwProcessId;

This needs further testing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions