mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-29 14:49:00 +08:00
Use static initialization for STARTUPINFO and PROCESS_INFORMATION
This commit is contained in:
parent
5faa2de3f5
commit
dcecfadbeb
@ -1174,16 +1174,12 @@ static pid_t spawn_process(struct mg_connection *conn, const char *prog,
|
|||||||
HANDLE me;
|
HANDLE me;
|
||||||
char *p, *interp, cmdline[PATH_MAX], buf[PATH_MAX];
|
char *p, *interp, cmdline[PATH_MAX], buf[PATH_MAX];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
STARTUPINFOA si;
|
STARTUPINFOA si = { sizeof(si); };
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi = {};
|
||||||
|
|
||||||
envp = NULL; // Unused
|
envp = NULL; // Unused
|
||||||
|
|
||||||
(void) memset(&si, 0, sizeof(si));
|
|
||||||
(void) memset(&pi, 0, sizeof(pi));
|
|
||||||
|
|
||||||
// TODO(lsm): redirect CGI errors to the error log file
|
// TODO(lsm): redirect CGI errors to the error log file
|
||||||
si.cb = sizeof(si);
|
|
||||||
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
|
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
|
||||||
si.wShowWindow = SW_HIDE;
|
si.wShowWindow = SW_HIDE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user