Commits on Source (4)
-
Jacob Lorentzon authored
rlct_clone will acquire a read lock, whereas fork will acquire a write lock. The write lock is necessary because the fork will clone the file table, which would result in other threads' fork/clone file descriptors not being closed. If an address space switch fd never gets closed, fork child processes and new threads, may never switch address spaces before they are started, which has resulted in hard-to-debug RIP=0 instr fetch page faults.
-
Jeremy Soller authored
Protect fork() and clone() behind a rwlock. See merge request !468
-
-
Jeremy Soller authored
Add tests for unistd.h constants See merge request !467
Showing
- src/platform/redox/clone.rs 22 additions, 0 deletionssrc/platform/redox/clone.rs
- src/platform/redox/mod.rs 7 additions, 3 deletionssrc/platform/redox/mod.rs
- src/sync/rwlock.rs 1 addition, 1 deletionsrc/sync/rwlock.rs
- tests/Makefile 1 addition, 0 deletionstests/Makefile
- tests/expected/bins_static/unistd/constants.stderr 0 additions, 0 deletionstests/expected/bins_static/unistd/constants.stderr
- tests/expected/bins_static/unistd/constants.stdout 16 additions, 0 deletionstests/expected/bins_static/unistd/constants.stdout
- tests/unistd/constants.c 123 additions, 0 deletionstests/unistd/constants.c
tests/unistd/constants.c
0 → 100644