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

Pavel Březina pbrezina at redhat.com
Tue Oct 2 09:44:31 UTC 2012


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.

-------------- 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/6dfb7204/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: 4092 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121002/6dfb7204/attachment-0001.bin>


More information about the sssd-devel mailing list