diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-06-20 03:45:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-06-20 03:49:59 +0200 |
commit | 9444b1f20e311f073864d81e913bd4f32fe95cfd (patch) | |
tree | 7b4752c690729df0acec75c9eb2382026bbf6899 /src/login/logind-session.h | |
parent | 77f40f165cc60a1d6b8a3503e4b7e46814d5935e (diff) |
logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
than fixed croup locations.
- logind can now collect minimal information about running
VMs/containers. As fixed cgroup locations can no longer be used we
need an entity that keeps track of machine cgroups in whatever slice
they might be located. Since logind already keeps track of users,
sessions and seats this is a trivial addition.
- nspawn will now register with logind and pass various bits of metadata
along. A new option "--slice=" has been added to place the container
in a specific slice.
- loginctl gained commands to list, introspect and terminate machines.
- user.slice and machine.slice will now be pulled in by logind.service,
since only logind.service requires this slice.
Diffstat (limited to 'src/login/logind-session.h')
-rw-r--r-- | src/login/logind-session.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/login/logind-session.h b/src/login/logind-session.h index a73df3a3bc..60597c2362 100644 --- a/src/login/logind-session.h +++ b/src/login/logind-session.h @@ -22,6 +22,7 @@ ***/ typedef struct Session Session; +typedef enum KillWho KillWho; #include "list.h" #include "util.h" @@ -54,12 +55,12 @@ typedef enum SessionType { _SESSION_TYPE_INVALID = -1 } SessionType; -typedef enum KillWho { +enum KillWho { KILL_LEADER, KILL_ALL, _KILL_WHO_MAX, _KILL_WHO_INVALID = -1 -} KillWho; +}; struct Session { Manager *manager; @@ -82,6 +83,7 @@ struct Session { char *remote_host; char *service; + char *slice; int vtnr; Seat *seat; @@ -108,8 +110,9 @@ struct Session { LIST_FIELDS(Session, gc_queue); }; -Session *session_new(Manager *m, User *u, const char *id); +Session *session_new(Manager *m, const char *id); void session_free(Session *s); +void session_set_user(Session *s, User *u); int session_check_gc(Session *s, bool drop_not_started); void session_add_to_gc_queue(Session *s); int session_activate(Session *s); |