mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[LibOS] Emulate clone(CLONE_VFORK | CLONE_VM | SIGCHLD) as vfork()
Some runtimes use clone(CLONE_VFORK | CLONE_VM | SIGCHLD) for vfork().
This commit is contained in:
committed by
Michał Kowalczyk
parent
bd72b968ee
commit
ec4a3f7bb5
@@ -171,6 +171,13 @@ int shim_do_clone (int flags, void * user_stack_addr, int * parent_tidptr,
|
||||
int * set_parent_tid = NULL;
|
||||
int ret = 0;
|
||||
|
||||
/* special case for vfork. some runtime uses clone() for vfork */
|
||||
if (flags == (CLONE_VFORK | CLONE_VM | SIGCHLD) &&
|
||||
user_stack_addr == NULL && parent_tidptr == NULL &&
|
||||
child_tidptr == NULL && tls == NULL) {
|
||||
return shim_do_vfork();
|
||||
}
|
||||
|
||||
assert((flags & ~(CLONE_PARENT_SETTID|CLONE_CHILD_SETTID|
|
||||
CLONE_CHILD_CLEARTID|CLONE_SETTLS|
|
||||
CLONE_VM|CLONE_FILES|
|
||||
|
||||
Reference in New Issue
Block a user