<sys/wait.h>
Change-Id: I24605df209d012e99333065428a3ed2752799321
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
|
||||
#define NO_TRACER 0 /* process is not being traced */
|
||||
|
||||
#define DUMPED 0200 /* bit set in status when core dumped */
|
||||
|
||||
#define MAX_CLOCK_T ((unsigned long) 1 << ((sizeof(clock_t) * 8) - 1))
|
||||
#define MAX_SECS ( (clock_t) (MAX_CLOCK_T/system_hz) )
|
||||
/* max.secs for setitimer() ((2^31-1)/HZ) */
|
||||
|
||||
@@ -499,8 +499,7 @@ int do_waitpid()
|
||||
if (sigismember(&rp->mp_sigtrace, i)) {
|
||||
sigdelset(&rp->mp_sigtrace, i);
|
||||
|
||||
mp->mp_reply.PM_WAITPID_STATUS =
|
||||
0177 | (i << 8);
|
||||
mp->mp_reply.PM_WAITPID_STATUS = W_STOPCODE(i);
|
||||
return(rp->mp_pid);
|
||||
}
|
||||
}
|
||||
@@ -649,7 +648,7 @@ register struct mproc *child; /* tells which process is exiting */
|
||||
|
||||
/* Wake up the parent by sending the reply message. */
|
||||
parent->mp_reply.PM_WAITPID_STATUS =
|
||||
(child->mp_exitstatus << 8) | (child->mp_sigstatus & 0377);
|
||||
W_EXITCODE(child->mp_exitstatus, child->mp_sigstatus);
|
||||
reply(child->mp_parent, child->mp_pid);
|
||||
parent->mp_flags &= ~WAITING; /* parent no longer waiting */
|
||||
child->mp_flags &= ~ZOMBIE; /* child no longer a zombie */
|
||||
@@ -673,7 +672,7 @@ struct mproc *child; /* tells which process is exiting */
|
||||
tracer = &mproc[mp_tracer];
|
||||
|
||||
tracer->mp_reply.PM_WAITPID_STATUS =
|
||||
(child->mp_exitstatus << 8) | (child->mp_sigstatus & 0377);
|
||||
W_EXITCODE(child->mp_exitstatus, (child->mp_sigstatus & 0377));
|
||||
reply(child->mp_tracer, child->mp_pid);
|
||||
tracer->mp_flags &= ~WAITING; /* tracer no longer waiting */
|
||||
child->mp_flags &= ~TRACE_ZOMBIE; /* child no longer zombie to tracer */
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
#include <machine/archtypes.h>
|
||||
#include <env.h>
|
||||
#include <assert.h>
|
||||
@@ -359,7 +360,7 @@ static void handle_vfs_reply()
|
||||
|
||||
case VFS_PM_CORE_REPLY:
|
||||
if (m_in.VFS_PM_STATUS == OK)
|
||||
rmp->mp_sigstatus |= DUMPED;
|
||||
rmp->mp_sigstatus |= WCOREFLAG;
|
||||
|
||||
exit_restart(rmp, TRUE /*dump_core*/);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <minix/com.h>
|
||||
#include <minix/callnr.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include "mproc.h"
|
||||
|
||||
@@ -267,7 +268,7 @@ int signo;
|
||||
sigdelset(&rmp->mp_sigtrace, signo);
|
||||
|
||||
rpmp->mp_flags &= ~WAITING; /* parent is no longer waiting */
|
||||
rpmp->mp_reply.PM_WAITPID_STATUS = 0177 | (signo << 8);
|
||||
rpmp->mp_reply.PM_WAITPID_STATUS = W_STOPCODE(signo);
|
||||
reply(rmp->mp_tracer, rmp->mp_pid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user