| 88 | }); |
| 89 | |
| 90 | function stopChild(child) { |
| 91 | console.log("Stopping child process:"); |
| 92 | //console.log(child); |
| 93 | console.log("Destroying stdout and stderr..."); |
| 94 | if (serverChild.stdout) serverChild.stdout.destroy(); |
| 95 | if (serverChild.stderr) serverChild.stderr.destroy(); |
| 96 | console.log("Sending SIGINT and SIGKILL..."); |
| 97 | serverChild.kill('SIGINT'); |
| 98 | serverChild.kill('SIGKILL'); |
| 99 | console.log("child terminated"); |
| 100 | } |
| 101 | |
| 102 | // Depending on how the app is launched, the tigervnc folder might be in different locations. |
| 103 | // Search order: |