1

I'm trying to start a process detached. Process.start() works, but when the parent process quits, the child process will be killed.

In Linux people call setsid() to start a new session, so the child process will stay alive if parent process dies. What's the equivalent solution in Windows?

daisy
  • 22,498
  • 29
  • 129
  • 265
  • Does this answer your question? [Start new process, without being a child of the spawning process](https://stackoverflow.com/questions/8434379/start-new-process-without-being-a-child-of-the-spawning-process) – Jonathon Chase Nov 06 '19 at 15:19

1 Answers1

0

use CreateProcess() with dwCreationFlags set to DETACHED_PROCESS.