strace.c: remove dead code

As strace does not use WCONTINUED flag, there is no need to handle
WIFCONTINUED status.

* strace.c (print_debug_info) [WIFCONTINUED]: Remove.
(next_event): Remove redundant !WIFSTOPPED check.
This commit is contained in:
Дмитрий Левин 2017-06-02 20:01:31 +00:00
parent 6b4efe9f01
commit 4a1a41cb7e

View File

@ -2026,11 +2026,6 @@ print_debug_info(const int pid, int status)
sprintf(buf, "WIFEXITED,exitcode=%u", WEXITSTATUS(status));
if (WIFSTOPPED(status))
sprintf(buf, "WIFSTOPPED,sig=%s", signame(WSTOPSIG(status)));
#ifdef WIFCONTINUED
/* Should never be seen */
if (WIFCONTINUED(status))
strcpy(buf, "WIFCONTINUED");
#endif
evbuf[0] = '\0';
if (event != 0) {
static const char *const event_names[] = {
@ -2406,15 +2401,11 @@ next_event(int *pstatus, siginfo_t *si)
if (WIFEXITED(status))
return TE_EXITED;
if (!WIFSTOPPED(status)) {
/*
* Neither signalled, exited or stopped.
* How could that be?
*/
error_msg("pid %u not stopped!", pid);
droptcb(tcp);
return TE_NEXT;
}
/*
* As WCONTINUED flag has not been specified to wait4,
* it cannot be WIFCONTINUED(status), so the only case
* that remains is WIFSTOPPED(status).
*/
/* Is this the very first time we see this tracee stopped? */
if (tcp->flags & TCB_STARTUP)