Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!emory!mephisto!mcnc!rti!bbt!rgs From: rgs@bbt.UUCP (steinbeiser) Newsgroups: comp.unix.programmer Subject: how to put a program into a .plan file Message-ID: <978@bbt.UUCP> Date: 26 Sep 90 18:49:58 GMT Reply-To: rgs@bbt.UUCP (steinbeiser) Organization: Broadband Technologies, Inc., Research Triangle Park, NC Lines: 20 >% /etc/mknod ~/.plan p (Assuming that any existing .plan is not there) >Then you simply write a C program that checks the status of the file, >to see whether someone (the fingerer) has opened it. Then simply >write your message to the named pipe. You can do many fancy things with this. >I know a user at our site who did something like this with his .plan, and every >time you fingered him, it would say how many people had fingered him today, >the weather, and even your name. And sometimes it would also finger the person >who fingered in the first place. Ok, how do you check the status of the file to see if it has been open by someone else? Its not obvious how (or if) stat() would do this. Also, would the C program have to be running constantly in the background someplace? Bob Steinbeiser Internet - rgs%bbt@rti.rti.org BroadBand Technologies Bitnet - rgs%bbt%rti.rti.org@CUNYVM Research Triangle Park NC Usenet - !mcnc!rti!bbt!rgs (919)-544-6850 X255