[Sheepdog] [PATCH] logger: correct crash_handler output
Liu Yuan
namei.unix at gmail.com
Sun Apr 29 02:12:38 CEST 2012
On 04/29/2012 01:12 AM, Shevek wrote:
> On Sat, 2012-04-28 at 21:59 +0800, Liu Yuan wrote:
>> On 04/28/2012 09:54 PM, Christoph Hellwig wrote:
>>
>>> We'd still like to print the pid of the died sheep pid - getppid()
>>> should do that work for that.
>>
>>
>> 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?
>
No, there is some bug that Christoph might bring in,
commit:7e0033c801a866a works as expected, which use pid to output
correct sheep's pid.
Thanks,
Yuan
More information about the sheepdog
mailing list