Revision 5379557b
b/linux-user/syscall.c | ||
---|---|---|
4867 | 4867 |
{ |
4868 | 4868 |
int status; |
4869 | 4869 |
ret = get_errno(waitpid(arg1, &status, arg3)); |
4870 |
if (!is_error(ret) && arg2 |
|
4870 |
if (!is_error(ret) && arg2 && ret
|
|
4871 | 4871 |
&& put_user_s32(host_to_target_waitstatus(status), arg2)) |
4872 | 4872 |
goto efault; |
4873 | 4873 |
} |
... | ... | |
6423 | 6423 |
rusage_ptr = NULL; |
6424 | 6424 |
ret = get_errno(wait4(arg1, &status, arg3, rusage_ptr)); |
6425 | 6425 |
if (!is_error(ret)) { |
6426 |
if (status_ptr) { |
|
6426 |
if (status_ptr && ret) {
|
|
6427 | 6427 |
status = host_to_target_waitstatus(status); |
6428 | 6428 |
if (put_user_s32(status, status_ptr)) |
6429 | 6429 |
goto efault; |
Also available in: Unified diff