Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate child information into a new structure #71

Closed
hangpark opened this issue Apr 12, 2017 · 1 comment
Closed

Separate child information into a new structure #71

hangpark opened this issue Apr 12, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@hangpark
Copy link
Owner

hangpark commented Apr 12, 2017

syscall_exec() waits a new process to be loaded by calling thread_yield() repetitively. While this waiting, a new process would be executed to load its data on the memory. But, it is also possible to happen that the new process terminates (after loaded and executed) before the parent wakes up. If so, child process was freed, so we can not deal with child process' information during the parent's last of syscall_exec() executions:

/* Return PID. */
if (p->status & PROCESS_FAIL)
    return PID_ERROR;
return p->pid;

Fortunately, Bochs does not involve this situation, but Qemu does (in such as wait-simple test, etc.)

We can avoid the situation in general making child process' information in another struct so the parent can manage it even if the child process is terminated and freed.

@hangpark hangpark added the bug label Apr 12, 2017
@hangpark hangpark added this to the Project #2 milestone Apr 12, 2017
@hangpark hangpark self-assigned this Apr 12, 2017
hangpark added a commit that referenced this issue Apr 12, 2017
[#71] Separte child infos into a new structure
@hangpark
Copy link
Owner Author

Done by PR #72.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant