Check "options" argument in wait4
Make wait4 return -EINVAL when not supported options are requested.
This commit is contained in:
@ -311,6 +311,9 @@ SYSCALL_DECLARE(wait4)
|
|||||||
struct waitq_entry waitpid_wqe;
|
struct waitq_entry waitpid_wqe;
|
||||||
int empty = 1;
|
int empty = 1;
|
||||||
|
|
||||||
|
if (options & ~(WNOHANG | WUNTRACED | WCONTINUED)) {
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
rescan:
|
rescan:
|
||||||
child = NULL;
|
child = NULL;
|
||||||
pid = (int)ihk_mc_syscall_arg0(ctx);
|
pid = (int)ihk_mc_syscall_arg0(ctx);
|
||||||
|
|||||||
Reference in New Issue
Block a user