Commit 1955cc27 authored by William Jon McCann's avatar William Jon McCann

Use a configure check for prctl

parent 86ac1662
......@@ -945,6 +945,12 @@ dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS(execinfo.h)
dnl ---------------------------------------------------------------------------
dnl check for process control
dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS(sys/prctl.h)
dnl ---------------------------------------------------------------------------
dnl - Define some variables to represent the directories we use.
dnl ---------------------------------------------------------------------------
......
......@@ -33,7 +33,8 @@
#include <grp.h>
#include <signal.h>
#include <sys/resource.h>
#if defined (__linux__)
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif
......@@ -468,7 +469,7 @@ server_child_setup (GdmServer *server)
sigprocmask (SIG_SETMASK, &mask, NULL);
/* Terminate the process when the parent dies */
#if defined (__linux__)
#ifdef HAVE_SYS_PRCTL_H
prctl (PR_SET_PDEATHSIG, SIGTERM);
#endif
......
......@@ -32,7 +32,7 @@
#include <pwd.h>
#include <grp.h>
#include <signal.h>
#if defined (__linux__)
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif
......@@ -88,7 +88,7 @@ static void
session_worker_job_child_setup (GdmSessionWorkerJob *session_worker_job)
{
/* Terminate the process when the parent dies */
#if defined (__linux__)
#ifdef HAVE_SYS_PRCTL_H
prctl (PR_SET_PDEATHSIG, SIGTERM);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment