Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

VS Code closes independent child process

$
0
0

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.


Viewing all articles
Browse latest Browse all 97371

Trending Articles