[sheepdog] [PATCH] logger: avoid using SIGHUP for detecting death of sheep

Liu Yuan namei.unix at gmail.com
Mon Jan 20 06:23:45 CET 2014


On Mon, Jan 20, 2014 at 10:35:29AM +0900, Hitoshi Mitake wrote:
> At Wed, 15 Jan 2014 18:00:47 +0900,
> Hitoshi Mitake wrote:
> > 
> > At Wed, 15 Jan 2014 16:49:23 +0900,
> > Hitoshi Mitake wrote:
> > > 
> > > At Wed, 15 Jan 2014 11:13:50 +0800,
> > > Liu Yuan wrote:
> > > > 
> > > > On Tue, Jan 14, 2014 at 05:46:26PM +0900, Hitoshi Mitake wrote:
> > > > > It seems that current method of detecting sheep's death from logger
> > > > > process sometimes fails. The SIGHUP is caught as a request of log
> > > > > rotation.
> > > > > 
> > > > > The problem comes from that SIGHUP is used for both of log rotation
> > > > > request and death detection, and getppid() somestimes returns value
> > > > > not equal to 1 when SIGHUP which is caused by the death rises.
> > > > 
> > > > why not == 1 if sheep dies? I think we need to find the root cause instead of
> > > > a workaround.
> > > 
> > > I don't know why. It would be a timing problem. So I employed a
> > > certainly usable way.
> > 
> > The behavior of getppid() in the above case would be out of scope of
> > POSIX standard. At least I couldn't find any information about
> > them. So I think we should employ a certain way.
> 
> ping?

I'm okay for this hotfix, but need Kazutaka's opinion.

Thanks
Yuan



More information about the sheepdog mailing list