[systemd-devel] [PATCH] core: if PR_SET_CHILD_SUBREAPER fails, log_error instead of warning

Tom Gundersen teg at jklm.no
Sun May 24 13:41:35 PDT 2015


On Sat, May 23, 2015 at 6:04 PM, Cristian Rodríguez
<crrodriguez at opensuse.org> wrote:
> It was a warning when we still supported kernel < 3.4. current
> minimum version is 3.7.

Hm, we don't actually fail out here, but we still try to continue.
Isn't 'warning' more appropriate in that case?

Cheers,
Tom

>  src/core/main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/core/main.c b/src/core/main.c
> index c39815b..3bebc98 100644
> --- a/src/core/main.c
> +++ b/src/core/main.c
> @@ -1608,9 +1608,7 @@ int main(int argc, char *argv[]) {
>          if (arg_running_as == MANAGER_USER) {
>                  /* Become reaper of our children */
>                  if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) {
> -                        log_warning_errno(errno, "Failed to make us a subreaper: %m");
> -                        if (errno == EINVAL)
> -                                log_info("Perhaps the kernel version is too old (< 3.4?)");
> +                        log_error_errno(errno, "Failed to make us a subreaper: %m");
>                  }
>          }
>
> --
> 2.4.1
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list