[radvd-devel-l] [PATCH] Use libdaemon for daemonization

Reuben Hawkins reubenhwk at gmail.com
Wed Apr 11 00:32:19 EDT 2012


On Tue, Apr 10, 2012 at 12:14 AM, Petr Pisar <ppisar at redhat.com> wrote:
> On Fri, Apr 06, 2012 at 11:03:58AM -0700, Reuben Hawkins wrote:
>> On Thu, Apr 5, 2012 at 9:21 AM, Petr Pisar <ppisar at redhat.com> wrote:
>> > On Thu, Apr 05, 2012 at 08:42:57AM -0700, Reuben Hawkins wrote:
>> >> 2012/4/5 Petr Písař <ppisar at redhat.com>:
>> >> > The libc daemon(3) function suffers from race bewtween exiting parent
>> >> > and saving PID into a file.
>> >> >
>> >> > Using libdaemon library one can avoid this race and can simplify PID
>> >> > file manipulation.
>> >> >
>> >> > The only difference against older implementation is, the PID file will
>> >> > be inspected, created, and removed only if daemonization is requested.
>> >>
>> >>
>> >> Hi Y'all,
>> >>
>> >> I'm having a problem with gmail forcing the patch inline in the message.
>> >>  This makes it difficult to use the patch.  The mail header doesn't seem
>> >> to have one of these: Content-Disposition: inline; filename=
>> >>
>> > Well, this is simple plain text email where the body is the patch. But if
>> > you have difficulties, I can resend it as attachment.
>> >
>> >> Does anybody know how to get gmail to not inline patches?
>> >>
>> > I have no idea. Some people told me that it's not possible to get it from
>> > Gmail web interface and recommended to use IMAP.
>> >
>>
>> Yes, please send the patch gzip'ed or something.
>>
> There it is as a MIME part with non-in-line diposition. You should think more
> about your mailbox provider. I think you can get the in-line patch from
> this mailing list archive.
>
> I have few comments to the patch:
>
> libdaemon provides pkg-config file to provide proper CFLAGS and LDFLAGS. I did
> not use it not to drag pkg-config into radvd configure-time dependencies.
> However using pkg-config would be more clean solution.
>
> I think the libdaemon dependency should be documented somewhere in the
> README. I did not do that.
>
> I replaced the daemon() call with the libdaemon code. It could be made
> optional.
>
> The libdaemon functions can do some low-level logging which I did not
> harness because I do not know if it's possible to patch them properly to radvd
> logging mechanism.
>
> -- Petr
>
> --
> radvd-devel-l mailing list  :  radvd-devel-l at litech.org
> http://lists.litech.org/listinfo/radvd-devel-l


Hi Petr,

I applied your patch.  The TODO things you mentioned in the last email
I'm going to leave them as TODO items, but as of now I think the only
one really worth looking into is the pkg-config configure time
checking to libdaemon.

I also bumped the version number to 1.9.

Thanks,
Reuben



More information about the radvd-devel-l mailing list