compile error of tcp/zoneserver.c in 1.3.07.08

Koh-ichi Ito kohi at iri.co.jp
Thu Jun 12 21:31:41 EDT 2008


Hello lists!

I noticed about new support policy from Sam, so please let
me report my issue here.

Summary:
- A compile is occured while making MaraDNS 1.3.07.08.

- I could avoid the error, but I'm not sure wheather my
  correction is right or not and would like to here some
  opinion.

-----
With MaraDNS 1.3.07.08, I experience the following compile
error on tcp/zoneserver.c under FreeBSD 6.3.

Script started on Fri Apr 11 15:38:08 2008
kohi at alphonse[1]% uname -a
FreeBSD alphonse.himoo.iri.co.jp 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #2: Fri Feb 15 09:58:21 JST 2008     kohi at alphonse.himoo.iri.co.jp:/usr/src/sys/i386/compile/alphonse  i386
kohi at alphonse[2]% cc -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.6 [FreeBSD] 20060305
kohi at alphonse[3]% pwd
/u/share/pub/src/maradns/maradns-1.3.07.08
kohi at alphonse[4]% make
cd libs ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" ; cd ../dns ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" ;  cd ../rng ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" ; cd ../parse ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" ;  cd ../qual ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" ; cd ../server ;  make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" "DEFINES=-DSELECT_PROBLEM" COMPILED=\""FreeBSD system at Thu Apr 10 15:47:55 JST 2008"\" "VERSION=1.3.07.08" ;  cd ../tools ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" ;  cd ../tcp ; make CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" "VERSION=1.3.07.08" ; cat ../00README.FIRST
cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread -O2 -fno-strict-aliasing -pipe  -c libtcp.c
cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread  -o getzone getzone.c ../libs/JsStr.o ../libs/JsStrOS.o ../libs/JsStrCP.o ../libs/MaraHash.o ../qual/qual_timestamp.o ../dns/Queries.o ../dns/Compress.o ../dns/bobbit.o ../dns/Decompress.o ../parse/ParseMaraRc.o ../parse/ParseCsv1.o ../parse/ParseIpAcl.o ../parse/Parse_ipv6.o ../parse/Csv2_read.o ../parse/Csv2_main.o ../parse/Csv2_parse.o ../parse/Csv2_rr_soa.o ../parse/Csv2_rr_aaaa.o ../parse/Csv2_rr_a.o ../parse/Csv2_rr_wks.o ../parse/Csv2_database.o ../parse/Csv2_rr_txt.o ../parse/Csv2_esc_txt.o ../server/timestamp.o ../server/MaraBigHash.o ../server/read_kvars.o  ../server/MaraAnyChain.o  libtcp.o
cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread  -DVERSION=\"1.3.07.08\" -o zoneserver zoneserver.c ../libs/JsStr.o ../libs/JsStrOS.o ../libs/JsStrCP.o ../libs/MaraHash.o ../qual/qual_timestamp.o ../dns/Queries.o ../dns/Compress.o ../dns/bobbit.o ../dns/Decompress.o ../parse/ParseMaraRc.o ../parse/ParseCsv1.o ../parse/ParseIpAcl.o ../parse/Parse_ipv6.o ../parse/Csv2_read.o ../parse/Csv2_main.o ../parse/Csv2_parse.o ../parse/Csv2_rr_soa.o ../parse/Csv2_rr_aaaa.o ../parse/Csv2_rr_a.o ../parse/Csv2_rr_wks.o ../parse/Csv2_database.o ../parse/Csv2_rr_txt.o ../parse/Csv2_esc_txt.o ../server/timestamp.o ../server/MaraBigHash.o ../server/read_kvars.o  ../server/MaraAnyChain.o  libtcp.o ../rng/rng-api-fst.o ../rng/rng-alg-fst.o
zoneserver.c: In function `main':
zoneserver.c:1017: error: too few arguments to function `setpgrp'
*** Error code 1

Stop in /u/share/pub/src/maradns/maradns-1.3.07.08/tcp.
*** Error code 1

Stop in /u/share/pub/src/maradns/maradns-1.3.07.08.
kohi at alphonse[5]% exit
exit

Script done on Fri Apr 11 15:38:30 2008


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;
      }


I cheat the FreeBSD ports, it was 1.2.12.08 and not contains
the section above ;_;  I guess your will by the comment, my
understanding is that set the pgid of zoneserver to its onw
one, not one inherits from shell to establish new pgrp of it
and its sibling to isolate them from the shell, so I
estimate that the right arguments of setpgrp() must be above
ones. Sure?

Thanks in advance.

					Koh-ichi Ito



More information about the list mailing list