+Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
+
+ * process.c: ProcessStartInfo may have only filename set and
+ arguments can be NULL.
+
Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
* icall.c: fix leak found by Robert Jordan.
gchar *spath = NULL;
MonoString *cmd = proc_start_info->arguments;
- MONO_ARCH_SAVE_REGS;
-
startinfo.cb=sizeof(STARTUPINFO);
startinfo.dwFlags=STARTF_USESTDHANDLES;
startinfo.hStdInput=stdin_handle;
#ifdef PLATFORM_WIN32
/* Seems like our CreateProcess does not work as the windows one.
* This hack is needed to deal with paths containing spaces */
+ /* FIXME: handle a NULL cms, since filename is the only value that must be set */
shell_path = NULL;
free_shell_path = FALSE;
tmp = mono_string_to_utf8 (cmd);
dir=mono_string_chars (proc_start_info->working_directory);
}
- ret=CreateProcess (shell_path, mono_string_chars (cmd), NULL, NULL, TRUE, CREATE_UNICODE_ENVIRONMENT, env_vars, dir, &startinfo, &procinfo);
+ ret=CreateProcess (shell_path, cmd? mono_string_chars (cmd): NULL, NULL, NULL, TRUE, CREATE_UNICODE_ENVIRONMENT, env_vars, dir, &startinfo, &procinfo);
g_free (env_vars);
if (free_shell_path)