compile error of tcp/zoneserver.c in 1.3.07.08
Sam Trenholme
strenholme.usenet at gmail.com
Fri Jun 13 14:35:55 EDT 2008
Basically, I applied that patch because it apparently makes the
program work a little better in Linux when daemonized. This seems to
be a case of me not being careful enough with my patches; there's a
lot of these little *NIX crevices that aren't really cross-platform
compatible.
It's up to someone using FreeBSD to make a patch that is not only
FreeBSD compatible, but able to keep the old daemonization behavior in
Linux. I personally only test the program in Linux and Windows +
MinGW. I sometimes am charitable and test it in Cygwin for people who
want more than the UDP DNS client and "askmara" in Win.
And oh, for everyone on the list: If you send me a MaraDNS-related
support question to this mailing address, I will *not* answer your
question and reserve the right to post your support email to the
MaraDNS mailing list so that the community at large can examine your
issue. MaraDNS security vulnerability reports, however, will be kept
confidential (Yes, I am posting this to the end of every message I
post to the list)
2008/6/13 Boris Dores <babal at via.ecp.fr>:
> On Fri, Jun 13, 2008 at 10:31:41AM (GMT+0900), Koh-ichi Ito wrote:
>> Though I'm not sure wheather it is right or wrong, the
>> following patch is efficient to avoid the above error.
>>
>> *** maradns-1.3.07.08/tcp/zoneserver.c-dist Wed Dec 26 04:14:46 2007
>> --- maradns-1.3.07.08/tcp/zoneserver.c Thu Apr 10 15:19:25 2008
>> ***************
>> *** 1014,1020 ****
>> js_string *synth_soa_origin;
>>
>> /* Kill children processes when we are signaled */
>> ! if(setpgrp()) {
>> printf(strerror(errno)); /* harderror() would kill the group which may not be correct yet */
>> return 3;
>> }
>> --- 1014,1020 ----
>> js_string *synth_soa_origin;
>>
>> /* Kill children processes when we are signaled */
>> ! if(setpgrp(0, getpid())) {
>> printf(strerror(errno)); /* harderror() would kill the group which may not be correct yet */
>> return 3;
>> }
>
> Actually, these lines comes from a patch of my own that Sam kindly
> applied. So I will try to answer this one.
>
> I could not test my patch on FreeBSD, and according to [1], it seems
> that you did find a bug. Unfortunately however, the above proposed
> patch won't compile on Linux.
>
> 1. http://manpages.courier-mta.org/htmlman2/setpgid.2.html
>
> The proper solution seems to be to replace "setpgrp()" by
> "setpgid(0,0)" (or to #ifdef based on the platform which seems
> unnecessary here).
>
> I have checked that this new fix works on Linux. Could you please
> recompile with this change, and tell us if it works ok on BSD (the
> purpose of these lines is that if you kill the parent process, it must
> kill all children too) ?
>
> If it does, I think it will be safe for Sam to apply this correction.
>
> --
> Boris Dorès
>
More information about the list
mailing list