Fix bug: X11 server keeps sending USR1 signals.

This commit is contained in:
Johns 2012-04-12 15:37:19 +02:00
parent deea34eb5e
commit 71f786711b
2 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,7 @@
User johns User johns
Date: Date:
Fix bug: X11 server keeps sending USR1 signals, which confuses suspend.
Show message for hot-keys. Show message for hot-keys.
Fix bug: playback errors with old PES recordings. Fix bug: playback errors with old PES recordings.
Adds Hot-key support for 4:3 zoom modes. Adds Hot-key support for 4:3 zoom modes.

View File

@ -2333,6 +2333,8 @@ static void StartXServer(void)
argn = 1; argn = 1;
if (X11DisplayName) { // append display name if (X11DisplayName) { // append display name
args[argn++] = X11DisplayName; args[argn++] = X11DisplayName;
// export display for childs
setenv("DISPLAY", X11DisplayName, 1);
} }
// split X server arguments string into words // split X server arguments string into words
if ((sval = X11ServerArguments)) { if ((sval = X11ServerArguments)) {
@ -2370,10 +2372,12 @@ static void StartXServer(void)
} }
// child // child
signal(SIGUSR1, SIG_IGN); // ignore to force answer signal(SIGUSR1, SIG_IGN); // ignore to force answer
//setpgid(0,getpid());
// start the X server // start the X server
execvp(args[0], (char *const *)args); execvp(args[0], (char *const *)args);
Error(_("x-setup: Failed to start X server '%s'\n"), args[0]); Error(_("x-setup: Failed to start X server '%s'\n"), args[0]);
exit(-1);
} }
/** /**
@ -2495,6 +2499,8 @@ void Housekeeping(void)
void MainThreadHook(void) void MainThreadHook(void)
{ {
if (Usr1Signal) { // x11 server ready if (Usr1Signal) { // x11 server ready
// FIYME: x11 server keeps sending sigusr1 signals
signal(SIGUSR1, SIG_IGN); // ignore further signals
Usr1Signal = 0; Usr1Signal = 0;
StartVideo(); StartVideo();
VideoDisplayWakeup(); VideoDisplayWakeup();