chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-event: fix typo
[elogind.git]
/
src
/
login
/
logind-session.c
diff --git
a/src/login/logind-session.c
b/src/login/logind-session.c
index a51f9f3e0fccd2c040e6c6db9cbf32add41941ed..ce5dbb4d5ccfa0a62d5da46c7cff8b7ac64df5f7 100644
(file)
--- a/
src/login/logind-session.c
+++ b/
src/login/logind-session.c
@@
-28,9
+28,7
@@
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <unistd.h>
-#include "sd-id128.h"
#include "sd-messages.h"
#include "sd-messages.h"
-#include "strv.h"
#include "util.h"
#include "mkdir.h"
#include "path-util.h"
#include "util.h"
#include "mkdir.h"
#include "path-util.h"
@@
-301,6
+299,7
@@
int session_load(Session *s) {
_cleanup_free_ char *remote = NULL,
*seat = NULL,
*vtnr = NULL,
_cleanup_free_ char *remote = NULL,
*seat = NULL,
*vtnr = NULL,
+ *state = NULL,
*pos = NULL,
*leader = NULL,
*type = NULL,
*pos = NULL,
*leader = NULL,
*type = NULL,
@@
-327,6
+326,7
@@
int session_load(Session *s) {
"SERVICE", &s->service,
"DESKTOP", &s->desktop,
"VTNR", &vtnr,
"SERVICE", &s->service,
"DESKTOP", &s->desktop,
"VTNR", &vtnr,
+ "STATE", &state,
"POS", &pos,
"LEADER", &leader,
"TYPE", &type,
"POS", &pos,
"LEADER", &leader,
"TYPE", &type,
@@
-415,13
+415,18
@@
int session_load(Session *s) {
s->class = c;
}
s->class = c;
}
+ if (state && streq(state, "closing"))
+ s->stopping = true;
+
if (s->fifo_path) {
int fd;
/* If we open an unopened pipe for reading we will not
get an EOF. to trigger an EOF we hence open it for
if (s->fifo_path) {
int fd;
/* If we open an unopened pipe for reading we will not
get an EOF. to trigger an EOF we hence open it for
- reading, but close it right-away which then will
- trigger the EOF. */
+ writing, but close it right away which then will
+ trigger the EOF. This will happen immediately if no
+ other process has the FIFO open for writing, i. e.
+ when the session died before logind (re)started. */
fd = session_create_fifo(s);
safe_close(fd);
fd = session_create_fifo(s);
safe_close(fd);