int pid;
int wait_errno;
int status;
- unsigned int sig;
- unsigned int event;
struct tcb *tcp;
struct rusage ru;
clear_regs();
- event = (unsigned int) status >> 16;
-
/* Set current output file */
current_tcp = tcp;
- if (event == PTRACE_EVENT_EXEC)
- return TE_STOP_BEFORE_EXECVE;
-
if (cflag) {
tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime);
tcp->stime = ru.ru_stime;
if (tcp->flags & TCB_STARTUP)
startup_tcb(tcp);
- sig = WSTOPSIG(status);
+ const unsigned int sig = WSTOPSIG(status);
+ const unsigned int event = (unsigned int) status >> 16;
switch (event) {
case 0:
}
return TE_RESTART;
#endif
+ case PTRACE_EVENT_EXEC:
+ return TE_STOP_BEFORE_EXECVE;
case PTRACE_EVENT_EXIT:
return TE_STOP_BEFORE_EXIT;
default: