syscall wait4: add _WALL (POSTK_DEBUG_ARCH_DEP_44)
Needed by strace -f
This commit is contained in:
@ -142,9 +142,7 @@
|
||||
#define WCONTINUED 0x00000008
|
||||
#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_44 /* wait() add support __WALL */
|
||||
#define __WALL 0x40000000 /* Wait on all children, regardless of type */
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
#define __WCLONE 0x80000000
|
||||
|
||||
/* idtype */
|
||||
|
||||
@ -669,21 +669,12 @@ do_wait(int pid, int *status, int options, void *rusage)
|
||||
|
||||
mcs_rwlock_writer_lock_noirq(&thread->proc->children_lock, &lock);
|
||||
list_for_each_entry_safe(child, next, &proc->children_list, siblings_list) {
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_44 /* wait() add support __WALL */
|
||||
/*
|
||||
if (!(options & __WALL)) {
|
||||
if (!(!!(options & __WCLONE) ^ (child->termsig == SIGCHLD))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
*/
|
||||
#else /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
/*
|
||||
if (!(!!(options & __WCLONE) ^ (child->termsig == SIGCHLD))) {
|
||||
if (!(options & __WALL) &&
|
||||
!(!!(options & __WCLONE) ^ (child->termsig == SIGCHLD))) {
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
|
||||
/* Find thread with pid == tid, this will be either the main thread
|
||||
* or the one we are looking for specifically when __WCLONE is passed */
|
||||
@ -882,11 +873,7 @@ SYSCALL_DECLARE(wait4)
|
||||
int rc;
|
||||
struct rusage usage;
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_44 /* wait() add support __WALL */
|
||||
if(options & ~(WNOHANG | WUNTRACED | WCONTINUED | __WCLONE | __WALL)){
|
||||
#else /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
if(options & ~(WNOHANG | WUNTRACED | WCONTINUED | __WCLONE)){
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
dkprintf("wait4: unexpected options(%x).\n", options);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -918,11 +905,7 @@ SYSCALL_DECLARE(waitid)
|
||||
pid = -1;
|
||||
else
|
||||
return -EINVAL;
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_44 /* wait() add support __WALL */
|
||||
if(options & ~(WEXITED | WSTOPPED | WCONTINUED | WNOHANG | WNOWAIT | __WCLONE | __WALL)){
|
||||
#else /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
if(options & ~(WEXITED | WSTOPPED | WCONTINUED | WNOHANG | WNOWAIT | __WCLONE)){
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_44 */
|
||||
dkprintf("wait4: unexpected options(%x).\n", options);
|
||||
dkprintf("waitid: unexpected options(%x).\n", options);
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user