You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 4, 2018. It is now read-only.
On unix, uv_spawn always returns an error code if it failed to spawn the child process.
On windows, whether or not uv_spawn returns an error code on failure depends upon the cause of the failure: some kinds of failures return an error code, other kinds return zero (e.g. file not found). Therefore user code can continue in the belief that there was no error, when in fact there was an error. In these cases, the error is saved in spawn_error, which is a private field of uv_process_t, so user code needs to special-case its error handling on windows.
The text was updated successfully, but these errors were encountered:
@bnoordhuis Is it actually true that unix always returns the error immediately?
If I'm reading the code correctly, execve failure will set process->errno but uv_spawn will still return 0.
* It will now report some types of errors synchronously, to bring it
on par with uv-unix. Fixes#865
* Failure to find the target executable will now set up stdio pipes
correctly, so the user can assume that when uv_spawn() returns 0
these pipes will never trigger asserts in libuv's guts.
On unix, uv_spawn always returns an error code if it failed to spawn the child process.
On windows, whether or not uv_spawn returns an error code on failure depends upon the cause of the failure: some kinds of failures return an error code, other kinds return zero (e.g. file not found). Therefore user code can continue in the belief that there was no error, when in fact there was an error. In these cases, the error is saved in spawn_error, which is a private field of uv_process_t, so user code needs to special-case its error handling on windows.
The text was updated successfully, but these errors were encountered: