Path: utzoo!attcan!uunet!vsedev!logan From: logan@vsedev.VSE.COM (James Logan III) Newsgroups: comp.unix.questions Subject: Re: signals to running processes Message-ID: <1268@vsedev.VSE.COM> Date: 2 Dec 88 03:54:15 GMT References: <950@taux01.UUCP> <1263@vsedev.VSE.COM> <555@auspex.UUCP> <1265@vsedev.VSE.COM> <1267@vsedev.VSE.COM> Reply-To: logan@vsedev.VSE.COM (James Logan III) Organization: VSE Software Development Lab Lines: 30 In article <1267@vsedev.VSE.COM> hudson@vsedev.VSE.COM (C Hudson Hendren III) writes: # # It would only need to call msgrcv() in the signal handler for SIGUSR1. # Shared memory could also read the char array the same way on receipt of SIGUSR1 (it could do it *faster* even!), but I don't see any good way of sending a signal to the daemon. How is another user going to find the PID of the daemon? Does the user run 'ps -ef | grep "some_name"' and give it to this other program as an argument? Do you hack on the "ps" source to look through the process table for some_name? Even if the daemon wrote its PID into some file, what do you think happens when *two* daemons are running? If the daemon writes the PID in append mode, how are do you know which PID is the one you're interested in? # Another advantage of this method is that there is no need to use semaphore # locking. That code is trivial and is not necessary on the daemon side. -Jim -- Jim Logan logan@vsedev.vse.com (703) 892-0002 uucp: ..!uunet!vsedev!logan inet: logan%vsedev.vse.com@uunet.uu.net