On Sat, Apr 28, 2012 at 08:46:58PM +0800, Liu Yuan wrote: > From: Liu Yuan <tailai.ly at taobao.com> > > 'pid' is always 0 in logger process. So it is useless to > output it. > > - fix logger pid output. > > Signed-off-by: Liu Yuan <tailai.ly at taobao.com> > --- > lib/logger.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/logger.c b/lib/logger.c > index 05e62a0..e9c773c 100644 > --- a/lib/logger.c > +++ b/lib/logger.c > @@ -385,10 +385,10 @@ static notrace void crash_handler(int signo) > vprintf(SDOG_ERR, "logger pid %d segfaulted.\n", > getpid()); > } else if (signo == SIGHUP) { > - vprintf(SDOG_ERR, "sheep pid %d exited unexpectedly.\n", pid); > + vprintf(SDOG_ERR, "sheep exited unexpectedly.\n"); We'd still like to print the pid of the died sheep pid - getppid() should do that work for that. |