Commit Graph

2 Commits

Author SHA1 Message Date
Hui, Chunyang
4c3ca79134 Make vfork stop parent child threads
When vfork is called and the current process has other running child threads,
for Linux, the other threads remain running. For Occlum, this behavior is
different. All the other threads will be frozen until the vfork returns
or execve is called in the child process.

The reason is that since Occlum doesn't support fork, many applications will
use vfork to replace fork. For multi-threaded applications, if vfork doesn't
stop other child threads, the application will be more likely to fail because
the child process directly uses the VM and the file table of the parent process.
2022-10-18 21:57:57 +08:00
Hui, Chunyang
99688183f0 Add vfork support 2021-08-24 11:24:03 +08:00