diff --git a/src/CHANGELOG b/src/CHANGELOG index 1f509cea1..282ba5c80 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -267,6 +267,11 @@ ECL 0.9i - Calling cl_shutdown() or cl_boot() multiple times is now safe. + - EXT::RUN-PROGRAM now makes sure the command is null-terminated to avoid + garbage characters (M. Goffioul) + + - [Win32] EXT::RUN-PROGRAM does not show a command window anymore (M. Goffioul) + * Documentation: - The HTML manuals now use CSS for a more appealing look. diff --git a/src/c/unixsys.d b/src/c/unixsys.d index e82e0727b..82f7443fb 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -144,6 +144,7 @@ stream_to_handle(cl_object s, bool output) cl_format(4, Cnil, make_simple_base_string("~S~{ ~S~}"), command, argv); + command = ecl_null_terminated_base_string(command); attr.nLength = sizeof(SECURITY_ATTRIBUTES); attr.lpSecurityDescriptor = NULL; @@ -237,7 +238,8 @@ stream_to_handle(cl_object s, bool output) ZeroMemory(&st_info, sizeof(STARTUPINFO)); st_info.cb = sizeof(STARTUPINFO); st_info.lpTitle = NULL; /* No window title, just exec name */ - st_info.dwFlags = STARTF_USESTDHANDLES; /* Specify std{in,out,err} */ + st_info.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; /* Specify std{in,out,err} */ + st_info.wShowWindow = SW_HIDE; st_info.hStdInput = child_stdin; st_info.hStdOutput = child_stdout; st_info.hStdError = child_stderr;