diff options
Diffstat (limited to 'src/util/jobs.h')
| -rw-r--r-- | src/util/jobs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/jobs.h b/src/util/jobs.h index d45433c..9accf84 100644 --- a/src/util/jobs.h +++ b/src/util/jobs.h @@ -1,4 +1,13 @@ /* See LICENSE file for copyright and license details. */ +#if defined(HAVE_PRCTL) +# include <sys/prctl.h> +#endif + +#if defined(HAVE_PRCTL) && defined(PR_SET_PDEATHSIG) +# define pdeath(SIGNAL) prctl(PR_SET_PDEATHSIG, SIGNAL); +#else +# define pdeath(SIGNAL) +#endif #define efork_jobs(...) enfork_jobs(1, __VA_ARGS__) #define ejoin_jobs(...) enjoin_jobs(1, __VA_ARGS__) |
