I'm writing an extension for VS Code. That extension spawns an child process at startup:
var child = cp.spawn('notepad', [], {
detached: true,
stdio: 'ignore'
});
child.unref();
(notepad for testing)
So normally spawning with detached = true and child.unref() it is supposed to stay open but once VS Code gets closed notepad also gets closed.
Is that a bug or intended? Am I doing something wrong? The goal is to keep the process open after VS Code closes.