mirror of
https://github.com/mirror/make.git
synced 2024-12-28 22:00:33 +08:00
Fix diagnostics on MS-Windows when environment is too large
* w32/subproc/sub_proc.c (process_begin): Fix test of the error cause when the environment block is too large. Copyright-paperwork-exempt: yes.
This commit is contained in:
parent
83443c706a
commit
168f12375d
@ -753,14 +753,15 @@ process_begin(
|
||||
|
||||
if (envp) {
|
||||
if (arr2envblk(envp, &envblk, &envsize_needed) == FALSE) {
|
||||
pproc->last_err = 0;
|
||||
pproc->lerrno = E_NO_MEM;
|
||||
free( command_line );
|
||||
if (pproc->last_err == ERROR_INVALID_PARAMETER
|
||||
if ((pproc->last_err == ERROR_INVALID_PARAMETER
|
||||
|| pproc->last_err == ERROR_MORE_DATA)
|
||||
&& envsize_needed > 32*1024) {
|
||||
fprintf (stderr, "CreateProcess failed, probably because environment is too large (%d bytes).\n",
|
||||
envsize_needed);
|
||||
}
|
||||
pproc->last_err = 0;
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user