Path: utzoo!attcan!uunet!husc6!mailrus!iuvax!purdue!decwrl!labrea!csli!gandalf From: gandalf@csli.STANFORD.EDU (Juergen Wagner) Newsgroups: comp.sources.d Subject: Re: "monthd" doesn't terminate Keywords: month, exit, ultrix 1.2 Message-ID: <6454@csli.STANFORD.EDU> Date: 15 Nov 88 21:39:46 GMT References: <1252@leah.Albany.Edu> <3035@haven.umd.edu> Reply-To: wagner.pa@xerox.com (Juergen Wagner) Organization: Center for the Study of Language and Information, Stanford U. Lines: 17 In article <3035@haven.umd.edu> louie@trantor.umd.edu (Louis A. Mamakos) writes: >I also have the problem with monthd not exiting when I log out; I have not >yet had the time to solve that problem. I don't have the original sources of `month' around, but the problem with `monthd' sitting around even after logging out can be fixed easily by doing a kill(getppid(), 0) and checking the return value for ESRCH. I did that in the main daemon loop after the sleeping. You could also check /etc/utmp if the user is still logged in, or use a wrapper which forks the monthd, and which kills it off as soon the parent dies. Juergen Wagner wagner.pa@xerox.com -- Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA