On Fri, Jun 13, 2014 at 04:41:07PM +0200, Werner Fink wrote:
> It was seen only once, nevertheless this change does avoid the
> assert on s->user->slice in session_start_scope()
Yeah, it seems possible that the slice will not be started and
the assert can fail. It seems that instead of checking s->user->slice
after the fact, user_start() should propagate the error code.
Possibly < 0 for fatal failure, 0 for slice or service start
failure, 1 on success.

Zbyszek

> diff --git src/login/logind-session.c src/login/logind-session.c
> index fdeacb1..86ce418 100644
> --- src/login/logind-session.c
> +++ src/login/logind-session.c
> @@ -560,6 +560,12 @@ int session_start(Session *s) {
>          if (r < 0)
>                  return r;
>  
> +        if (!s->user->slice) {
> +                if (errno)
> +                        return -errno;
> +                return -ESTALE;
> +        }
> +
>          /* Create cgroup */
>          r = session_start_scope(s);
>          if (r < 0)
> -- 
> 1.7.9.2
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to