Commit d3725549 authored by Chase Douglas's avatar Chase Douglas Committed by Peter Hutterer
Browse files

Add global variable inSignalContext



This will be used for checking for proper logging when in signal
context.
Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 8dc70acb
......@@ -99,6 +99,8 @@ xf86SIGIO(int sig)
int save_errno = errno; /* do not clobber the global errno */
int r;
inSignalContext = TRUE;
ready = xf86SigIOMask;
to.tv_sec = 0;
to.tv_usec = 0;
......@@ -114,6 +116,8 @@ xf86SIGIO(int sig)
}
/* restore global errno */
errno = save_errno;
inSignalContext = FALSE;
}
static int
......
......@@ -2,6 +2,8 @@
#ifndef _XSERV_GLOBAL_H_
#define _XSERV_GLOBAL_H_
#include <signal.h>
#include "window.h" /* for WindowPtr */
/* Global X server variables that are visible to mi, dix, os, and ddx */
......@@ -23,6 +25,7 @@ extern _X_EXPORT int GrabInProgress;
extern _X_EXPORT Bool noTestExtensions;
extern _X_EXPORT char *SeatId;
extern _X_EXPORT char *ConnectionInfo;
extern _X_EXPORT sig_atomic_t inSignalContext;
#ifdef DPMSExtension
extern _X_EXPORT CARD32 DPMSStandbyTime;
......
......@@ -204,6 +204,8 @@ int auditTrailLevel = 1;
char *SeatId = NULL;
sig_atomic_t inSignalContext = FALSE;
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#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