Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!purdue!gatech!ukma!sean From: sean@ms.uky.edu (Sean Casey) Newsgroups: comp.unix.wizards Subject: Night of the Living Dead Processes Keywords: brains! Message-ID: <10927@s.ms.uky.edu> Date: 20 Jan 89 11:02:49 GMT Organization: The Leaning Tower of Patterson Office @ The Univ. of KY Lines: 40 I'm having problems with Zombies... I've been installing a bunch of games around here. Some of them are networked multiplayer games, and I wanted a way to list all the users of them. For reasons I won't go into, I implemented this as a program that is from within the games in question. It is run whenever a player is added, and it is run whenever a player leaves. A global database is then updated that players can gets reports from via a program. The code fragment to run my program looks like: { pidbuf[8]; sprintf(pidbuf, "%d", getpid()); if (vfork() == 0) { execl(my program etc etc etc args); exit(-1); } } Unfortunately, the programs in question have one or more INET sockets open, and the child inherits the descriptors. When the child exits, some part of the connection hangs, and the child wakes from the dead, goes out, and eats brains. That is, it becomes . I'm moderately familiar with INET sockets. The sockets are being SO_NOLINGER-ed and may or may not have data pending at the point of the vfork(). I've tried a bulk closing of any and all file descriptors after vfork to no avail. Is there any way to really NAIL a file descriptor? To say close_dammit_I_really_want_to_exit(fd)? I consider it rude to fill up the process table with shambling corpses. Sean -- *** Sean Casey sean@ms.uky.edu, sean@ukma.bitnet *** Who sometimes never learns. {backbone site|rutgers|uunet}!ukma!sean *** U of K, Lexington Kentucky, USA ..where Christian movies are banned. *** ``There's only TWO THINGS come out of Oklahoma...''