Unless you're calling fork() deliberately, I'm not sure why you'd be seeing a fork. My crazy guess is that gethostbyname() calls it.
(It's not as crazy as you might think... Once I was given the job of writing a new implementation of gethostbyname() that removed the runtime dependency on the dynamic C runtime (don't ask, it was something we needed to do) -- the way I implemented it was to fork and call "nslookup". Maybe these days the glibc people have done something similar?)
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}