mirror of
https://github.com/opnsense/src.git
synced 2026-02-10 22:35:04 -05:00
linux(4): Add support for __WALL wait option bit.
As FreeBSD does not have __WALL option bit analogue explicitly set all possible option bits to emulate Linux __WALL wait option bit. Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D31555 MFC after: 2 weeks
This commit is contained in:
parent
d7e1e138ec
commit
c7ef7c3fac
1 changed files with 11 additions and 0 deletions
|
|
@ -1063,6 +1063,14 @@ linux_wait4(struct thread *td, struct linux_wait4_args *args)
|
|||
*/
|
||||
options |= WEXITED | WTRAPPED;
|
||||
|
||||
/*
|
||||
* As FreeBSD does not have __WALL option bit analogue explicitly set all
|
||||
* possible option bits to emulate Linux __WALL wait option bit. The same
|
||||
* for waitid system call.
|
||||
*/
|
||||
if ((args->options & __WALL) != 0)
|
||||
options |= WUNTRACED | WCONTINUED | WLINUXCLONE;
|
||||
|
||||
if (args->pid == WAIT_ANY) {
|
||||
idtype = P_ALL;
|
||||
id = 0;
|
||||
|
|
@ -1096,6 +1104,9 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args)
|
|||
|
||||
options = 0;
|
||||
linux_to_bsd_waitopts(args->options, &options);
|
||||
if ((args->options & __WALL) != 0)
|
||||
options |= WEXITED | WTRAPPED | WUNTRACED |
|
||||
WCONTINUED | WLINUXCLONE;
|
||||
|
||||
switch (args->idtype) {
|
||||
case LINUX_P_ALL:
|
||||
|
|
|
|||
Loading…
Reference in a new issue