What I want is to add some processing after command produced output in stdout. So finally I want to create a function to use like this: The function should use promise from child-process-promise, wait until successful result produced and return promise for processing data. Answer Welcome to Stack Overflow @ScHoolboy. I cansuggest you use a basic child-process module from Node.js
Tag: child-process
Node child_process await result
I have a async function which makes a face_detection command line call. It’s working fine otherwise, but I can’t make it to wait for the response. Here is my function: isThereFace in my response I return is always undefined because the response is sent to client before the response from face_detection is ready. How could I make this work? Answer
Node.js child process exec returning : Error: kill EPERM STDERR STDOUT_SIZE
I am exposing and API dedicated to printing logs from a Linux System D service. Here is a sample of the code: If the date in “completeCmd” is close enough (ex: last 10 days), everything works… if the date is too far back (ex: 3 months ago), the process fails in a weird way: The response is returned in about
Weird output “<Buffer" in child_process.spawn
Trying to write a script to dump my MongoDB to afterwards restore it in a Test database again. Weirdly the script does what it is supposed to (I can find the output BSON under the specified location), but the output is cryptic: Answer That output is just encoded text. Try this to see the real output: Note that this output