[SSSD] [PATCH] MONITOR: Fix start up with closed standard input

Pavel Reichl preichl at redhat.com
Wed Apr 23 08:30:23 UTC 2014


On Thu, 2014-04-17 at 20:01 +0200, Lukas Slebodnik wrote:
> On (17/04/14 10:21), Lukas Slebodnik wrote:
> >ehlo,
> >
> >The attached patch fixes my use case. (sssd in container without tty)
> >I am not sure whether other processes use stdin, therefore I disable monitorin
> >of stdin only in main process.
> >
> >LS
> 
> Problem can be reproduced with changing service file
> 
> --- a/src/sysv/systemd/sssd.service.in
> +++ b/src/sysv/systemd/sssd.service.in
> @@ -5,11 +5,9 @@ After=syslog.target
>  
>  [Service]
>  EnvironmentFile=- at environment_file@
> -ExecStart=@sbindir@/sssd -D -f
> +ExecStart=@sbindir@/sssd -i -d3
>  # These two should be used with traditional UNIX forking daemons
>  # consult systemd.service(5) for more details
> -Type=forking
> -PIDFile=@localstatedir@/run/sssd.pid
>  
>  [Install]
>  WantedBy=multi-user.target
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Hello Lukas,

I was able to reproduce the issue and I confirm that your patch solves
it, however I tested only on Fedora. I wonder if we should ask the
reporter to test the patch on Debian/Ubuntu?

Code looks good to me. I have just a little nitpick about
using: bool need_stdin

I think it's more readable to use something like:
enum need_stdin {NEED_STDIN, DO_NOT_NEED_STDIN};

But maybe it's just me.

Thanks.






More information about the sssd-devel mailing list