fix some -1 exit codes

On Windows, exit(-1) counts as success instead of failure.
This commit is contained in:
Matthew Flatt 2021-05-11 16:51:04 -06:00
parent 391b5579f4
commit 8b4b6cfaec
2 changed files with 4 additions and 4 deletions

View File

@ -1122,7 +1122,7 @@ static void *malloc_plain_sector(int count, int executable)
if (GC_out_of_memory)
GC_out_of_memory();
FPRINTF(STDERR, "out of memory\n");
exit(-1);
exit(1);
}
return m;
@ -2342,7 +2342,7 @@ static void *do_malloc(SET_NO_BACKINFO
#if CHECK_COLLECTING
if (collecting_now) {
exit(-1);
exit(1);
}
#endif

View File

@ -287,7 +287,7 @@ int wmain(int argc_in, wchar_t **argv_in)
sprintf(errbuff,"Can't find %S\n",go);
WriteStr(out,errbuff);
#endif
exit(-1);
exit(1);
}
args[0] = go;
@ -336,7 +336,7 @@ int wmain(int argc_in, wchar_t **argv_in)
cl_len, MAXCOMMANDLEN,command_line);
WriteStr(out,errbuff);
#endif
exit(-1);
exit(1);
}
if (!CreateProcessW(go,