- Make sure command string is null terminated

- Do not show command window (only meaningful from non-console Windows program).
This commit is contained in:
mgoffioul 2006-06-26 09:01:42 +00:00
parent 4464ad2c79
commit 176bcbce13
2 changed files with 8 additions and 1 deletions

View file

@ -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.

View file

@ -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;