Closed machinewu closed 4 years ago
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
I have a case of using "child_process" module performs the shell command "zip" to compress files. If the file "/tmp/test.dat" not exists (For the time being without "fs" module to detect if the file exists):
It will show
But if I run the following command:
It will show
So, this case cannot use only stdout or stderr to detect errors occurred.(Although I can match the "error" or "warn" or other keywords, but I think This is not a good solution.)
I think "execFile" function's "callback" method should add exitCode as a parameter for slove this case. I found the source code in child_process.js at line 91:
"callback" method's first parameter is set null! This is a waste of an argument! Change the first parameter to exitcode, I think it would be better.