From b5cdfa40ca6aae5e98a69da7a8b350215f807649 Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Sat, 3 Mar 2018 18:37:50 +0000 Subject: login: fix FDNAME in call to sd_pid_notify_with_fds() $ git grep FDNAME logind-session-device.c: ... "FDNAME=session-", sd->session->id); logind-session-device.c: ... "FDNAME=session", sd->session->id); Oops. Fixes #8343. Or at least a more minimal reproducer. Xorg still dies when logind is restarted, but the Xorg message says this is entirely deliberate. (This could also be the reason I hit #8035, instead of the race condition I originally suggested). --- src/login/logind-session-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index c64fb4359b..7253f95981 100644 --- a/src/login/logind-session-device.c +++ b/src/login/logind-session-device.c @@ -526,7 +526,7 @@ int session_device_save(SessionDevice *sd) { return 0; m = strjoina("FDSTORE=1\n" - "FDNAME=session", sd->session->id); + "FDNAME=session-", sd->session->id); r = sd_pid_notify_with_fds(0, false, m, &sd->fd, 1); if (r < 0) -- cgit v1.2.1 From f8f9419e8765dd427301fa479fb014c5f92250ed Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Sat, 3 Mar 2018 18:44:39 +0000 Subject: login: remember that fds received from PID1 need to be removed eventually Remember to set sd->pushed_fd when we receive an fd from PID1 on startup, the same as we set it when we send an fd to PID1. --- src/login/logind-session-device.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index 7253f95981..73eee72515 100644 --- a/src/login/logind-session-device.c +++ b/src/login/logind-session-device.c @@ -543,5 +543,6 @@ void session_device_attach_fd(SessionDevice *sd, int fd, bool active) { assert(!sd->active); sd->fd = fd; + sd->pushed_fd = true; sd->active = active; } -- cgit v1.2.1