pid
A Integer | undefined
representing the process identifier (PID) of the child process. Until the child process has spawned successfully, the value is undefined
. When the child process exits, then the value is undefined
after the exit
event is emitted.
Note: You can use the pid
to determine if the process is currently running.