Document wait and process descriptor behavior introduced in r286698.
When the wait*(2) syscalls wait for any process (P_ALL), they should ignore processes created with the pdfork(2) syscall.
Details
- Reviewers
wblock glebius - Group Reviewers
manpages - Commits
- rS301159: Document behavior of wait introduced in the r286698.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
lib/libc/sys/wait.2 | ||
---|---|---|
602 | This sentence looks not quite right, and it's hard to tell what it is saying. Maybe: .Fn wait waits for child processes, but ignores a child with process descriptors (see .Xr pdfork 2 ) . | |
605 | Maybe Process descriptors can still be waited on using the process ID or descriptor (see |
lib/libc/sys/wait.2 | ||
---|---|---|
602 | Thanks for help I'm not good at it ;( So what I was trying to say is that if we gave -1 as wait argument which means "wait for any child process" the process descriptors (which are still the child of the process) will be ignored. But you can still wait for process using it ID. If we write like you proposed I'm not sure if it will be understood that we mean only situation where we wait for any process.. |
lib/libc/sys/wait.2 | ||
---|---|---|
602 | Still not quite clear on the explanation, but let me try again: .Fn wait called with -1 to wait for any child process will ignore child process descriptors (see .Xr pdfork 2 ) . Specific processes can still be waited on by specifying the process ID (see .Xr pdwait 2 ). Should that be pdwait4 ? |
lib/libc/sys/wait.2 | ||
---|---|---|
602 | Ok I changed it almost as you requested. So basically process descriptors are process which have been created using pdfork. Such process not only have pid but also process descriptor (which is similar to file descriptor). The wait function can still be used with such process but you need to give him the PID of process. If you will gave -1 which means "wait for any" wait will ignore status of process descriptors. There is also plan to implement pdwait which will be similar to wait but instead of using PIDs you will use process descriptors. |
lib/libc/sys/wait.2 | ||
---|---|---|
601 | Is the case in question when there is a process descriptor that is a handle for the child, or when the child holds process descriptors that are handles for grandchildren processes? The current text is a bit unclear. |
lib/libc/sys/wait.2 | ||
---|---|---|
601 | Sorry. For keep you waiting |
lib/libc/sys/wait.2 | ||
---|---|---|
601 | Okay. How about "will ignore a child that is referenced by a process descriptor"? |
lib/libc/sys/wait.2 | ||
---|---|---|
605 | This sound better for me. |
lib/libc/sys/wait.2 | ||
---|---|---|
601 | Repeated word: "will will" |