Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created April 4, 2019 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/34dde76eb4d74255ab1e288b6999ddaa to your computer and use it in GitHub Desktop.
Save isaacs/34dde76eb4d74255ab1e288b6999ddaa to your computer and use it in GitHub Desktop.
diff --git a/bin/wrap.js b/bin/wrap.js
index c15862c..b7d995f 100644
--- a/bin/wrap.js
+++ b/bin/wrap.js
@@ -1,15 +1,13 @@
var sw = require('spawn-wrap')
var NYC = require('../index.js')
-var parentPid = process.env.NYC_PARENT_PID || '0'
-process.env.NYC_PARENT_PID = process.pid
-
var config = {}
if (process.env.NYC_CONFIG) config = JSON.parse(process.env.NYC_CONFIG)
config.isChildProcess = true
config._processInfo = {
- ppid: parentPid,
+ pid: process.pid,
+ ppid: process.ppid,
root: process.env.NYC_ROOT_ID
}
if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment