-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Description
Hey bros, I am troubled by the waker.
int main(void){
int pid1 = vfork();
if (pid1) {
printf("Process %d try to do something more! \n",pid1);
int pid2 = vfork();
if (pid2) {
printf("Process %d try to do something! \n",pid2);
}else{
execl("/bin/dosomething", "/bin/dosomething", NULL);
}
}else{
execl("/bin/domorething", "/bin/domorething", NULL);
}
return 0;
}For the above case that parent process first vfork one child, when the child start to execute domorething, the parent successfully awake and leave vfork(). But when the parent process vfork the second child process and child process also start to execute something, it seems that the parent process can not be awaked by the code bellow and go into poll method. So the parent process can not timely leave vfork(). Do you have some ideas about the waker?
zCore/zircon-object/src/object/mod.rs
Line 317 in 9290158
| waker.wake_by_ref(); |
Crayon-newCrayon-newCrayon-newCrayon-newCrayon-new
Metadata
Metadata
Assignees
Labels
No labels