[Sheepdog] [PATCH] logger: correct crash_handler output
Liu Yuan
namei.unix at gmail.com
Sun Apr 29 02:27:11 CEST 2012
On 04/29/2012 01:12 AM, Shevek wrote:
>> Yes, I tried use getppid() initially, but I found that getppid() always
>> > return 1 in my distro (ubuntu) and I didn't try to trace why. So I
>> > simply remove pid, given that some bug in other place or my dirstro goes
>> > ill-configured.
>> >
>> > Maybe I'd better call getppid() here and wait fixes from other place.
> The reason getppid() returns 1 is that it was called in the sheep, and
> the parent is (correctly) init. If log_sigexit() is called in the sheep,
> you need getpid().
>
> Since it is possible for any signal, especially SEGV, to be delivered
> either to the sheep or the logger, we need a flag to tell the method
> which process received the signal.
>
> Christoph, remember we discussed this briefly?
Okay, I fixed the bug that Christoph brings in. It works well before
commit:cc5e7ee93a67acc535, I wonder how did you get that false
conclusion? Anyway, pid is waitpid() by logger and we must not leave it
by other wrong value.
Thanks,
Yuan
More information about the sheepdog
mailing list