cosmopolitan/libc/proc
Justine Tunney 29eb7e67bb
Fix fork() regression on Windows
Recent optimizations to fork() introduced a regression, that could cause
the subprocess to fail unexpectedly, when TlsAlloc() returns a different
index. This is because we were burning the indexes into the displacement
of x86 opcodes. So when fork() happened and the executable memory copied
it would use the old index. Right now the way this is being solved is to
not copy the executable on fork() and then re-apply code changes. If you
need to be able to preserve self-modified code on fork, reach out and we
can implement a better solution for you. This gets us unblocked quickly.
2025-01-05 09:25:23 -08:00
..
BUILD.mk Make execve() linger when it can't spoof parent 2025-01-04 21:13:37 -08:00
clock.c Implement proper time zone support 2024-05-04 23:06:37 -07:00
daemon.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
describefds.c Fix fork() regression on Windows 2025-01-05 09:25:23 -08:00
describefds.internal.h Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
execl.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
execle.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
execlp.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
execv.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
execve-nt.greg.c Fix fork() regression on Windows 2025-01-05 09:25:23 -08:00
execve-sysv.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
execve.c Make execve() linger when it can't spoof parent 2025-01-04 21:13:37 -08:00
execve.internal.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
execvp.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
execvpe.c Delete ASAN 2024-06-22 05:45:49 -07:00
fexecve.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
fork-nt.c Fix fork() regression on Windows 2025-01-05 09:25:23 -08:00
fork-sysv.c Introduce FreeBSD ARM64 support 2023-12-29 20:14:02 -08:00
fork.c Fix fork() regression on Windows 2025-01-05 09:25:23 -08:00
getppid-nt.c Make execve() linger when it can't spoof parent 2025-01-04 21:13:37 -08:00
getppid.c Make execve() linger when it can't spoof parent 2025-01-04 21:13:37 -08:00
getpriority-nt.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
getpriority.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
getrusage-nt.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
getrusage-sysv.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
getrusage.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
handle.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
kill-nt.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
kill.c Spoof PID across execve() on Windows 2024-12-14 13:13:08 -08:00
killpg.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
nice.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
ntspawn.h Support shebang on Windows 2024-05-20 22:11:42 -07:00
posix_spawn.c Make execve() linger when it can't spoof parent 2025-01-04 21:13:37 -08:00
posix_spawn.h Fix handling of paths with dirfd on Windows 2024-09-01 17:52:30 -07:00
posix_spawn.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
posix_spawn_add_file_action.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
posix_spawn_file_actions_addchdir_np.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
posix_spawn_file_actions_addclose.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
posix_spawn_file_actions_adddup2.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
posix_spawn_file_actions_addfchdir_np.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
posix_spawn_file_actions_addopen.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
posix_spawn_file_actions_destroy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawn_file_actions_init.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_destroy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_getflags.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_getpgroup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_getrlimit.c Fix handling of paths with dirfd on Windows 2024-09-01 17:52:30 -07:00
posix_spawnattr_getschedparam.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_getschedpolicy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_getsigdefault.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_getsigmask.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_init.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_setflags.c Fix handling of paths with dirfd on Windows 2024-09-01 17:52:30 -07:00
posix_spawnattr_setpgroup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_setrlimit.c Fix handling of paths with dirfd on Windows 2024-09-01 17:52:30 -07:00
posix_spawnattr_setschedparam.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_setschedpolicy.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_setsigdefault.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnattr_setsigmask.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
posix_spawnp.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
proc.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
proc.h Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
sched_getaffinity.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
sched_setaffinity.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
setpriority-nt.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
setpriority.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
times.c Fix bugs in times() function 2024-12-23 20:57:10 -08:00
verynice.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
vfork.S Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
wait.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wait3.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wait4-nt.c Fix fork() regression on Windows 2025-01-05 09:25:23 -08:00
wait4-sysv.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
wait4.c Add missing lock to fork() on Windows 2025-01-03 19:01:58 -08:00
waitpid.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00