Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
windows: fail uv_spawn() if options.file is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky committed Sep 19, 2011
1 parent 37e8bf2 commit ee115bf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/win/process.c
Expand Up @@ -845,14 +845,19 @@ static int duplicate_std_handle(uv_loop_t* loop, DWORD id, HANDLE* dup) {
int uv_spawn(uv_loop_t* loop, uv_process_t* process,
uv_process_options_t options) {
int err = 0, keep_child_stdio_open = 0;
wchar_t* path;
wchar_t* path = NULL;
int size;
BOOL result;
wchar_t* application_path, *application, *arguments, *env, *cwd;
wchar_t* application_path = NULL, *application = NULL, *arguments = NULL, *env = NULL, *cwd = NULL;
HANDLE* child_stdio = process->child_stdio;
STARTUPINFOW startup;
PROCESS_INFORMATION info;

if (!options.file) {
uv_set_error(loop, UV_EINVAL, 0);
return -1;
}

uv_process_init(loop, process);

process->exit_cb = options.exit_cb;
Expand Down

0 comments on commit ee115bf

Please sign in to comment.