Created
March 12, 2014 08:44
-
-
Save ami-GS/9503132 to your computer and use it in GitHub Desktop.
get process ID using Node.js and its child_process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spawn = require('child_process').spawn; | |
var grep = spawn('grep', ['ssh']); | |
console.log(grep.pid); | |
grep.stdin.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment