Start new process, without being a child of the spawning process

Andrew Paglusch picture Andrew Paglusch · Dec 8, 2011 · Viewed 25.6k times · Source

How would I go about starting a new process without it being the child of the calling process.

Example:

Main Program (Caller.exe)

process.start("file.exe")

Image:

enter image description here

Answer

Josh picture Josh · Dec 8, 2011

If the spawning process (parent) ends before the spawned process (child) does, then the parent-child chain is broken. To make use of this, you'd have to use an intermediate stub-process like so:

Caller.exe → Stub.exe → File.exe.

Here Stub.exe is simple launcher program that ends just after starting File.exe.