mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 06:42:27 +00:00
Put more thought into i/o polyfills
wait4() is now solid enough to run `make -j100` on Windows. You can now use MSG_DONTWAIT on Windows. There was a handle leak in accept() that's been fixed. Our WIN32 overlapped i/o code has been simplified. Priority class now inherits into subprocesses, so the verynice command will work and the signal mask will now be inherited by execve() and posix_spawn()
This commit is contained in:
parent
736fdb757a
commit
e961385e55
52 changed files with 679 additions and 487 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/sysconf.h"
|
||||
#include "libc/stdio/sysparam.h"
|
||||
#include "libc/sysv/consts/rlimit.h"
|
||||
#include "libc/sysv/consts/sa.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
|
@ -58,8 +59,10 @@ void SetUp(void) {
|
|||
// tune down the main process's stack size to a reasonable amount
|
||||
// some operating systems, e.g. freebsd, will do things like have
|
||||
// 500mb RLIMIT_STACK by default, even on machines with 400mb RAM
|
||||
struct rlimit rl = {2 * 1024 * 1024, 2 * 1024 * 1024};
|
||||
if (!IsWindows() && !IsXnu()) {
|
||||
struct rlimit rl;
|
||||
getrlimit(RLIMIT_STACK, &rl);
|
||||
rl.rlim_cur = MIN(rl.rlim_cur, 2 * 1024 * 1024);
|
||||
ASSERT_SYS(0, 0, setrlimit(RLIMIT_STACK, &rl));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue