strace/wait.h
Dmitry V. Levin d6c71dd061 Fix preprocessor indentation
Indent the C preprocessor directives to reflect their nesting
using the following script:

$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do
	cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done
2018-12-30 15:35:21 +00:00

43 lines
950 B
C

/*
* Copyright (c) 2004-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_WAIT_H
# define STRACE_WAIT_H
# include "defs.h"
# include <sys/wait.h>
# include "static_assert.h"
/*
* On Linux, the "core dumped" flag is hard-coded to 0x80:
* fs/coredump.c:coredump_finish() after v3.10-rc1~143^2~41,
* fs/coredump.c:do_coredump() between v3.7-rc1~134^2~4 and v3.10-rc1~143^2~41,
* or fs/exec.c:do_coredump() before v3.7-rc1~134^2~4
*/
# ifndef WCOREFLAG
# define WCOREFLAG 0x80
# else
static_assert((WCOREFLAG) == 0x80, "WCOREFLAG != 0x80");
# endif
# ifndef WCOREDUMP
# define WCOREDUMP(status) ((status) & (WCOREFLAG))
# endif
# ifndef W_STOPCODE
# define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
# endif
# ifndef W_EXITCODE
# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
# endif
# ifndef W_CONTINUED
# define W_CONTINUED 0xffff
# endif
#endif /* STRACE_WAIT_H */