#include <sys/wait.h>
-#ifndef __WNOTHREAD
-# define __WNOTHREAD 0x20000000
-#endif
-#ifndef __WALL
-# define __WALL 0x40000000
-#endif
-#ifndef __WCLONE
-# define __WCLONE 0x80000000
-#endif
-
#include "xlat/wait4_options.h"
#if !defined WCOREFLAG && defined WCOREFLG
tprintf("%d, ", pid);
} else {
/* status */
- if (!tcp->u_arg[1])
- tprints("NULL");
- else if (syserror(tcp) || tcp->u_rval == 0)
- tprintf("%#lx", tcp->u_arg[1]);
- else if (umove(tcp, tcp->u_arg[1], &status) < 0)
- tprints("[?]");
- else
+ if (tcp->u_rval == 0)
+ printaddr(tcp->u_arg[1]);
+ else if (!umove_or_printaddr(tcp, tcp->u_arg[1], &status))
printstatus(status);
/* options */
tprints(", ");
if (n == 4) {
tprints(", ");
/* usage */
- if (!tcp->u_arg[3])
- tprints("NULL");
- else if (tcp->u_rval > 0) {
+ if (tcp->u_rval > 0) {
#ifdef ALPHA
if (bitness)
printrusage32(tcp, tcp->u_arg[3]);
printrusage(tcp, tcp->u_arg[3]);
}
else
- tprintf("%#lx", tcp->u_arg[3]);
+ printaddr(tcp->u_arg[3]);
}
}
return 0;
if (entering(tcp)) {
printxval(waitid_types, tcp->u_arg[0], "P_???");
tprintf(", %ld, ", tcp->u_arg[1]);
- }
- else {
+ } else {
/* siginfo */
printsiginfo_at(tcp, tcp->u_arg[2]);
/* options */
if (tcp->s_ent->nargs > 4) {
/* usage */
tprints(", ");
- if (!tcp->u_arg[4])
- tprints("NULL");
- else if (tcp->u_error)
- tprintf("%#lx", tcp->u_arg[4]);
- else
- printrusage(tcp, tcp->u_arg[4]);
+ printrusage(tcp, tcp->u_arg[4]);
}
}
return 0;