Answer the question
In order to leave comments, you need to log in
How to see if child process is running?
I have code:
function checkStunnel(){
// return true
return false
}
function stunnelConnection(){
if(!checkStunnel()){
execFile('./stunnel/bin/stunnel.exe', (error, stdout, stderr) => {
if (error) {
// throw error;
throw new Error( error );
}
console.log('error',error);
console.log('stdout',stdout);
console.log('stderr',stderr);
});
}
}
Answer the question
In order to leave comments, you need to log in
On *nix usually via the .pid file, or via the service status in systemd\upstart\... .
That is, you should not directly call the process - but do something like '''systemctl service stunnel start''' '''/etc/init.d/stunnel start''' .... that is, run through the "wrapper"
And, accordingly, through "wrapper" and find out the status is running\working\dead
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question