Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!udel!rochester!quiroz From: quiroz@cs.rochester.edu (Cesar Quiroz) Newsgroups: comp.unix.programmer Subject: Re: how process in background can kill itself after logout (BSD unix). Summary: check for getppid()==1 Message-ID: <1991Jan30.043225.16772@cs.rochester.edu> Date: 30 Jan 91 04:32:25 GMT References: <1991Jan29.012702.7265@nntp-server.caltech.edu> <1991Jan29.234858.15536@nntp-server.caltech.edu> Reply-To: quiroz@cs.rochester.edu (Cesar Quiroz) Organization: University of Rochester, Department of Computer Science Lines: 10 One more: check for getppid()==1. You turn into a child of init when your natural parent has left for good. Doesn't work if your parent is waiting on you, rather than dying on logout itself. Of course, then *it* could be checking for its parent turning into init. -- Cesar Augusto Quiroz Gonzalez Department of Computer Science University of Rochester Rochester, NY 14627