On (23/04/14 10:57), Jakub Hrozek wrote:
On Wed, Apr 23, 2014 at 10:30:23AM +0200, Pavel Reichl wrote:
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=-@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@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.
I was actually thinking we should close the stdin always. I can't think of a reason to keep it open.
I tought it would be problem to monitor closed file descriptor with tevent_add_fd, but it isn't.
New version attached.
LS