[SSSD] [PATCH] monitor: create pid file after all responders are started

Pavel Březina pbrezina at redhat.com
Tue Oct 2 10:00:03 UTC 2012


On 10/02/2012 11:56 AM, Jakub Hrozek wrote:
> On Tue, Oct 02, 2012 at 11:44:31AM +0200, Pavel Březina wrote:
>> On 10/02/2012 11:18 AM, Jakub Hrozek wrote:
>>> On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
>>>>> I wonder if the exit() is necessary? Would it be enough to just return
>>>>> the error code and perhaps also from client_registration() ?
>>>>
>>>> When the pidfile was created in server_setup(), the monitor exited
>>>> with 2, so I followed this scenario. But you are right. SSSD is
>>>> fully functional at this point so we shouldn't exit it just because
>>>> we where unable to create pidfile.
>>>>
>>>
>>> Sorry, I think I confused you. I would prefer aborting becuse the initscripts
>>> have no way to signal the SSSD to shut down, but in general I think that
>>> using exit() from outside main() is not very nice. Is there a way to pass
>>> the error code all the way up to the main loop and terminate the SSSD there?
>>
>> Ah, no, it is called via D-Bus so there is no such way afaik.
>> Patches with exit() are attached.
>>
>
> What about sending a SIGTERM to itself with kill(getpid(), SIGTERM) ? I
> think it's used elsewhere in the code as well..

Sounds good to me. Patches are attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-few-coding-style-issues.patch
Type: text/x-patch
Size: 1693 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121002/f43e3269/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-monitor-create-pid-file-after-all-responders-are-sta.patch
Type: text/x-patch
Size: 4108 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121002/f43e3269/attachment-0001.bin>


More information about the sssd-devel mailing list