[SSSD] [PATCH] exit original process after sssd is initialized

Pavel Březina pbrezina at redhat.com
Fri Nov 2 21:58:03 UTC 2012


On 11/02/2012 06:53 PM, Simo Sorce wrote:
> On Thu, 2012-11-01 at 17:36 +0100, Pavel Březina wrote:
>> +        if (ctx->is_daemon && ctx->parent_pid > 0
>> +                && ctx->parent_pid == getppid()) {
>> +            if (ctx->parent_pid <= 0 || ctx->parent_pid != getppid())
>> {
>> +                /* the parent process was already terminated */
>> +                DEBUG(SSSDBG_MINOR_FAILURE, ("Invalid parent pid
>> \n"));
>> +                goto done;
>> +            }
>> +
>
> Isn't the second if condition redundant here ?
> we can't even test it unless it is already true according to the
> previous if () or am I missing something ?
> Did you intend to use some || in the previous condition ?
>
> Simo.
>

I'm sending a new set of patches. There are the three original and two new.

[1/5] fixes indentation in the whole server.c
[2/5] introduces a new debug level macro SSSDBG_IMPORTANT_INFO that 
should be used instead of SSSDBG_FATAL_FAILURE on places where the 
original level was 0, but it is not an error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-indendation-in-server.c.patch
Type: text/x-patch
Size: 7257 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121102/51a2c13b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-add-SSSDBG_IMPORTANT_INFO-macro.patch
Type: text/x-patch
Size: 1089 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121102/51a2c13b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-make-monitor_quit-usable-outside-signal-handler.patch
Type: text/x-patch
Size: 3647 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121102/51a2c13b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-exit-original-process-after-sssd-is-initialized.patch
Type: text/x-patch
Size: 4959 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121102/51a2c13b/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-create-pid-file-immediately-after-fork-again.patch
Type: text/x-patch
Size: 3322 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121102/51a2c13b/attachment-0004.bin>


More information about the sssd-devel mailing list