Child Node processes poll and exit when parent has exited. Fixes #270

This commit is contained in:
SteveSandersonMS
2016-08-19 16:38:39 -07:00
parent 1ce8a2215c
commit eed4d8c211
6 changed files with 225 additions and 18 deletions

View File

@@ -114,9 +114,10 @@ If you haven't yet installed node-inspector, you can do so as follows:
debuggingArgs = string.Empty;
}
var thisProcessPid = Process.GetCurrentProcess().Id;
var startInfo = new ProcessStartInfo("node")
{
Arguments = debuggingArgs + "\"" + entryPointFilename + "\" " + (commandLineArguments ?? string.Empty),
Arguments = $"{debuggingArgs}\"{entryPointFilename}\" --parentPid {thisProcessPid} {commandLineArguments ?? string.Empty}",
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardOutput = true,