Skip to content

Commit

Permalink
win: map ERROR_BAD_EXE_FORMAT to UV_EFTYPE (libuv#4445)
Browse files Browse the repository at this point in the history
CreateProcessW() in uv_spawn() on Windows will fail with
ERROR_BAD_EXE_FORMAT if attempting to run a file that is not
an executable.

Refs: libuv#2348
  • Loading branch information
huseyinacacak-janea authored Jul 11, 2024
1 parent fedfa98 commit 36f0789
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/win/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ int uv_translate_sys_error(int sys_errno) {
case ERROR_INVALID_FUNCTION: return UV_EISDIR;
case ERROR_META_EXPANSION_TOO_LONG: return UV_E2BIG;
case WSAESOCKTNOSUPPORT: return UV_ESOCKTNOSUPPORT;
case ERROR_BAD_EXE_FORMAT: return UV_EFTYPE;
default: return UV_UNKNOWN;
}
}

0 comments on commit 36f0789

Please sign in to comment.