Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wait.h 950B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2004-2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #ifndef STRACE_WAIT_H
  8. # define STRACE_WAIT_H
  9. # include "defs.h"
  10. # include <sys/wait.h>
  11. # include "static_assert.h"
  12. /*
  13. * On Linux, the "core dumped" flag is hard-coded to 0x80:
  14. * fs/coredump.c:coredump_finish() after v3.10-rc1~143^2~41,
  15. * fs/coredump.c:do_coredump() between v3.7-rc1~134^2~4 and v3.10-rc1~143^2~41,
  16. * or fs/exec.c:do_coredump() before v3.7-rc1~134^2~4
  17. */
  18. # ifndef WCOREFLAG
  19. # define WCOREFLAG 0x80
  20. # else
  21. static_assert((WCOREFLAG) == 0x80, "WCOREFLAG != 0x80");
  22. # endif
  23. # ifndef WCOREDUMP
  24. # define WCOREDUMP(status) ((status) & (WCOREFLAG))
  25. # endif
  26. # ifndef W_STOPCODE
  27. # define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
  28. # endif
  29. # ifndef W_EXITCODE
  30. # define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
  31. # endif
  32. # ifndef W_CONTINUED
  33. # define W_CONTINUED 0xffff
  34. # endif
  35. #endif /* STRACE_WAIT_H */