mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-04 21:51:02 +00:00
Improve performance and remove fd leaks
This commit is contained in:
parent
26e254fb4d
commit
1965d7488e
17 changed files with 131 additions and 159 deletions
|
@ -18,6 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/ntspawn.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/struct/sigaction.internal.h"
|
||||
#include "libc/calls/syscall_support-nt.internal.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/pushpop.internal.h"
|
||||
|
@ -83,6 +84,7 @@ textwindows int ntspawn(
|
|||
char16_t prog16[PATH_MAX];
|
||||
rc = -1;
|
||||
block = NULL;
|
||||
_init_sigchld();
|
||||
if (__mkntpath(prog, prog16) == -1) return -1;
|
||||
// we can't call malloc() because we're higher in the topological order
|
||||
// we can't call kmalloc() because fork() calls this when kmalloc is locked
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue