Hi, Some time ago I made an alternate of Circle to do DNS lookups (some old version of it is available on the circlemud ftp site :). When I did this, I developed a little application, that was supposed to run 'besides' the mud, and fork off processes to make the gethostbyaddr() calls, to those wouldn't lag the main mud proccess. Anyway, making this little application, it left a lot of zombie processes, and I got some code help here, from a swede I think, now... This works all fine on Linux, but the code supposed to kill off the process, so it doesn't go into zombie state gives the following error when compiling it under BSD (the commercial/buyable version, not FreeBSD): make ../bin/DNSLookup.exe gcc -g -O -Wall -o ../bin/DNSLookup.exe util/dnslookup.c In file included from util/dnslookup.c:27: /usr/include/sys/resource.h:59: field `ru_utime' has incomplete type /usr/include/sys/resource.h:60: field `ru_stime' has incomplete type In file included from util/../sysdep.h:89, from util/dnslookup.c:35: /usr/include/sys/wait.h:98: redefinition of `union wait' *** Error code 1 The sysdep.h and conf.h included in the file are included after the 'library <>' ones. Anyway, I can't get the code compiled obviously, and I was wondering if anyone knew how to come arround the problem ? I'm not at all known with BSD, and just helping someone out, so if I could pick someones brain that would be great. Besides, is anyone using that patch i released with the DNS lookup utility ? Just wondering, since I never got any mails saying so, and I don't really want to update somethign that noone else is using... Btw. the code piece I'm using to kill the zombies is the following: RETSIGTYPE sigchld() { struct rusage ru; pid_t wait3(int *, int, struct rusage *); wait3(NULL, WNOHANG, &ru); } And calling it from the main() function like this: +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST