Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Child process when to kill

When my node project is started it create a child process , this needed to be done just once so I put this code on the server.js file, In the child process I execute command like npm install... my questions is :

  1. Do I need to kill sometime this process?
  2. What could happen if the node application is down before I able to kill it?
like image 938
07_05_GuyT Avatar asked Jun 04 '26 11:06

07_05_GuyT


1 Answers

1.Do I need to kill sometime this process?

Ans: If that process is not going to get used further then you better kill it once its job is done.

2.What could happen if the node application is down before I able to kill it?

Ans: If your main node application goes down then your child processes are ultimately gonna get killed so you don't need to worry about it.

like image 111
Viddesh Avatar answered Jun 05 '26 23:06

Viddesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!