diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-19 23:09:59 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-23 22:03:49 +0200 |
commit | 6eb20fb8d28749e0b710a54daa1b916080cf4ea1 (patch) | |
tree | 898631149f1034efcd9b0f267d07ec3572177b46 /xwayland/sockets.c | |
parent | 3cc5b1acc6014ef424630c2ac2ae5b024c2b57e8 (diff) |
init xwm only once Xwayland server is ready
Diffstat (limited to 'xwayland/sockets.c')
-rw-r--r-- | xwayland/sockets.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xwayland/sockets.c b/xwayland/sockets.c index 868d6ada..714969fe 100644 --- a/xwayland/sockets.c +++ b/xwayland/sockets.c @@ -83,6 +83,9 @@ void unlink_sockets(int display) { snprintf(sun_path, sizeof(sun_path), socket_fmt, display); unlink(sun_path); + + snprintf(sun_path, sizeof(sun_path), lock_fmt, display); + unlink(sun_path); } int open_display_sockets(int socks[2]) { @@ -121,7 +124,7 @@ int open_display_sockets(int socks[2]) { } long int read_pid; read_pid = strtol(pid, &end_pid, 10); - if (read_pid < 0 || read_pid > INT32_MAX || end_pid != pid + sizeof(pid)) { + if (read_pid < 0 || read_pid > INT32_MAX || end_pid != pid + sizeof(pid) - 2) { continue; } errno = 0; |