systemd src/login/sd-loginc.c: _public_ int sd_session_is_active(const char *session) { r = parse_env_file(p, NEWLINE, "ACTIVE", &s, NULL); r = parse_boolean(s); explains this ;) But I see the systemd issue from your comment #c26.