> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Rainer Gerhards
> Sent: Thursday, January 10, 2013 4:51 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] Privilege drop makes stopping it (via Ubuntu
> upstart) to hang
> 
> > -----Original Message-----
> > From: [email protected] [mailto:rsyslog-
> > [email protected]] On Behalf Of Radu Gheorghe
> > Sent: Thursday, January 10, 2013 4:08 PM
> > To: rsyslog-users
> > Subject: Re: [rsyslog] Privilege drop makes stopping it (via Ubuntu
> > upstart) to hang
> >
> > Hello,
> >
> > I'm back :) Here's what I got (correct me if I'm wrong):
> >
> > Without dropped privileges, rsyslogd forks and exits. It writes the
> PID
> > of
> > the forked process in the pid file, and everyone is happy.
> >
> > With dropped privileges, rsyslogd forks but doesn't exit. I guess
> > that's
> > because the parent runs as root and needs to remain there. The pid
> file
> > still contains the PID of the child process, but it's no good killing
> > it,
> > since the parent is still alive.
> >
> > While I don't know how/if it can be implemented, what makes sense to
> me
> > is
> > the following solution:
> > - even with dropped privileges, the main rsyslogd instance should
> exit
> > after the initialization is finished
> 
> 
> Mmmhhhh... I am puzzled by this finding. As far as termination of
> processes is concerned, there is no intended difference between priv
> drop and not. I will check the code if I can see anything. If that's
> due to some OS restriction, I'd be glad if someone could let me know
> what's going on.
> 

I think I found the culprit: signaling the parent probably does no longer work 
when privs are dropped:

http://git.adiscon.com/?p=rsyslog.git;a=blob;f=tools/syslogd.c;h=bd5b52cae06eb28cd80fb0afc503276b10c342f2;hb=HEAD#l2003

Now I need to think how to handle that...

Rainer
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to