Answer the question
In order to leave comments, you need to log in
How to connect to output and input streams and manage processes?
Good time.
Knowing the PID is it possible to connect to the output and input streams of the process? The option to run the process as a child is acceptable. But what if the nodejs process crashes?
Also, please tell me the libraries for monitoring and managing processes (Linux, Windows). Preferably cross platform. You need to know the memory used and the load on the cpu.
Answer the question
In order to leave comments, you need to log in
see here nodejs.org/api/child_process.html#child_process_ch...
ready-made examples of how to start a child process and read stdout stderr.
If you do not set the detached flag at the start of the child process (see ibid), then when the main process crashes, the child will be automatically closed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question