Sockets and forking

From: Rasmus Ronlev (raro94ab@STUDENT.ECON.CBS.DK)
Date: 12/20/97


Hi,

I'm having some trouble with the children of a process to 'DIE'. They wind
up as zombie processes, and since the 'parrent' process is used for
looking up DNS entries for the people logging into my mud, this gets
pretty bad in the long run, with loads of these zombies hanging arround.

I got some code (a long time ago *G*) from a swede on this list, that
removed the problem on Linux. I recently tried running the same utility on
a BSD system, and the added code didn't help on there, and started
producing massive amounts of zombie processes again... *sigh*

So... I was wondering. Would it be possible, that if I close the sockets
of the communicating parrent and child in the wrong order, or don't flush
the 'sockets' or something, that this would cause the children to end up
as zombies ?

I guess what I'm asking about is, if there's a way that's the 'RIGHT' (tm)
thing to do when having socket communications between the parrent and
child processes, and if there's a 'WRONG' way to do it, that I've choosen?

The utility does the work it's supposed to like a charm on both Linux and
BSD, it's just, that the zombie processes it creates is kind of.. well..
Unwanted in most system administrators point of view :)

Hops someone can shed some light on this.
Regards,
Rand

.d
--
        Rasmus Ronlev DOEK'94           http://www.econ.cbs.dk/~raro94ab
             IT-Advisor               mailto:raro94ab@student.econ.cbs.dk

              B.Sc. Computer Science and Business Administration
          Stud. M.Sc. Computer Science and Business Administration


     +------------------------------------------------------------+
     | 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