mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-24 13:28:30 +00:00
Make execve() linger when it can't spoof parent
It's now possible to use execve() when the parent process isn't built by cosmo. In such cases, the current process will kill all threads and then linger around, waiting for the newly created process to die, and then we propagate its exit code to the parent. This should help bazel and others Allocating private anonymous memory is now 5x faster on Windows. This is thanks to VirtualAlloc() which is faster than the file mapping APIs. The fork() function also now goes 30% faster, since we are able to avoid the VirtualProtect() calls on mappings in most cases now. Fixes #1253
This commit is contained in:
parent
c97a858470
commit
42a3bb729a
40 changed files with 612 additions and 656 deletions
|
@ -57,11 +57,6 @@
|
|||
* compiled by MSVC or Cygwin is launched instead, then only the stdio
|
||||
* file descriptors can be passed along.
|
||||
*
|
||||
* On Windows, the parent process must be a cosmo program. If you're
|
||||
* calling execve() from a program that wasn't launched by cosmopolitan
|
||||
* bash, or some similar program, then ask yourself if what you really
|
||||
* want is to either (a) call fork() first, or (b) use posix_spawn().
|
||||
*
|
||||
* On Windows, `argv` and `envp` can't contain binary strings. They need
|
||||
* to be valid UTF-8 in order to round-trip the WIN32 API, without being
|
||||
* corrupted.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue