summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2008-11-11 17:00:26 -0500
committerDavid Reveman <davidr@novell.com>2008-11-11 17:00:26 -0500
commit0e937cb11bfd1eabd573e2fb4f1ab452213ba9a8 (patch)
tree29d72ef55330711a895d5908ee82979395af2a33
parent5946cdf71abc7e2f1390e4badea93b0a8e086045 (diff)
Replace HAVE_SIGPROCMASK with SIG_BLOCK and make sure
display can be re-launched at server reset.
-rw-r--r--hw/dmx/dmxlaunch.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/hw/dmx/dmxlaunch.c b/hw/dmx/dmxlaunch.c
index b10db894a..4cab11826 100644
--- a/hw/dmx/dmxlaunch.c
+++ b/hw/dmx/dmxlaunch.c
@@ -135,6 +135,8 @@ dmxAbortDisplay (void)
if (xbeAuth)
unlink (xbeAuth);
+
+ xbePid = 0;
}
static void
@@ -148,13 +150,13 @@ static void
sigUsr1Jump (int sig)
{
-#ifdef HAVE_SIGPROCMASK
+#ifdef SIG_BLOCK
sigset_t set;
#endif
signal (sig, sigUsr1Waiting);
-#ifdef HAVE_SIGPROCMASK
+#ifdef SIG_BLOCK
sigemptyset (&set);
sigaddset (&set, SIGUSR1);
sigprocmask (SIG_UNBLOCK, &set, NULL);
@@ -285,7 +287,16 @@ dmxLaunchDisplay (int argc, char *argv[], int index, char *vt)
int mask;
if (xbePid)
- return TRUE;
+ return FALSE;
+
+ if (xbeArgv)
+ {
+ free (xbeArgv);
+ xbeArgv = NULL;
+ nXbeArgv = 0;
+ }
+
+ receivedUsr1 = 0;
strcpy (xbeAuthBuf, xbeAuthTempl);
mask = umask (0077);