I followed this guide and tried to call npm start
or node somejs.js
. The problem is, as soon as the first line from console.log has been printed, the eof is written into the pipe, and so the live output would terminate.
I switched to proc_open()
and used proc_get_status()
to monitor the running status, and I've got the exact same effect in the end. And the running
has turned into false
as soon as one line has been printed.
Can anybody suggest to me a better way to achieve what I'd like to achieve? (showing all live outputs from npm start
without terminating it, until the command ends naturally).
Thanks in advance!