aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/slim-sigusr1.patch
blob: 344b02933efa609d6f021ef670d3451723c9bc76 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
This patch fixes SLiM so it really waits for the X server to be ready
before attempting to connect to it.  Indeed, the X server notices that
its parent process has a handler for SIGUSR1, and consequently sends it
SIGUSR1 when it's ready to accept connections.

The problem was that SLiM doesn't pay attention to SIGUSR1.  So in practice,
if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on
/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000,
where nobody answers; eventually, it times out and tries again on
/tmp/.X11-unix/X0, and finally it shows up on the screen.

Patch by L. Courtès.

--- slim-1.3.6/app.cpp	2014-02-05 15:27:20.000000000 +0100
+++ slim-1.3.6/app.cpp	2014-02-09 22:42:04.000000000 +0100
@@ -119,7 +119,9 @@ void CatchSignal(int sig) {
 	exit(ERR_EXIT);
 }
 
+static volatile int got_sigusr1 = 0;
 void User1Signal(int sig) {
+	got_sigusr1 = 1;
 	signal(sig, User1Signal);
 }
 
@@ -884,6 +886,7 @@ int App::WaitForServer() {
 	int	ncycles	 = 120;
 	int	cycles;
 
+	while (!got_sigusr1);
 	for(cycles = 0; cycles < ncycles; cycles++) {
 		if((Dpy = XOpenDisplay(DisplayName))) {
 			XSetIOErrorHandler(xioerror);
an title='2018-03-17 03:36:03 -0400'>2018-03-17gnu: curl: Ungraft....Mark H Weaver 2018-03-14gnu: curl: Add HTTP/2 support....Tobias Geerinckx-Rice 2018-03-14gnu: curl: Update replacement to 7.59.0 [security fixes]....Marius Bakke 2018-03-14gnu: kurly: Update to 1.2.1....Tobias Geerinckx-Rice 2018-03-04gnu: kurly: Declare a source file-name....Efraim Flashner 2018-01-24Merge branch 'master' into core-updatesMark H Weaver 2018-01-24gnu: curl: Update replacement to 7.58.0 [fixes CVE-2018-{1000005,1000007}]....Leo Famulari 2018-01-11Merge branch 'master' into core-updatesLeo Famulari 2018-01-08gnu: kurly: Install some documentation....Leo Famulari 2018-01-03Merge branch 'master' into core-updatesLeo Famulari 2017-12-31gnu: Add kurly....Leo Famulari