Check "options" argument in wait4

Make wait4 return -EINVAL when not supported options are requested.
This commit is contained in:
Masamichi Takagi
2014-09-04 17:28:14 +09:00
parent a16c3170ef
commit e45632c9f8

View File

@ -311,6 +311,9 @@ SYSCALL_DECLARE(wait4)
struct waitq_entry waitpid_wqe;
int empty = 1;
if (options & ~(WNOHANG | WUNTRACED | WCONTINUED)) {
return -EINVAL;
}
rescan:
child = NULL;
pid = (int)ihk_mc_syscall_arg0(ctx);