Path: utzoo!attcan!uunet!snorkelwacker!usc!ucsd!ucbvax!agate!usenet From: labb-4ac@web-4b.berkeley.edu (superMan (the web dweller)) Newsgroups: comp.unix.programmer Subject: Re: how to put a program into .plan file Message-ID: <1990Sep26.155456.1656@agate.berkeley.edu> Date: 26 Sep 90 15:54:56 GMT Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: University of California, Berkeley Lines: 30 In article <2782@idunno.Princeton.EDU> subbarao@phoenix.Princeton.EDU (Kartik Su bbarao) writes: > > [ some part deleted ] > >The "cool" way to do this is to set up your .plan as a named pipe with >/etc/mknod. > >% /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. > > -Kartik Pardon my ignorance, but how can you write a C program which checks the status of the file to see whether someone has opened it? Exactly what system call or library function do you use? Please send reply to Internet address achoi@cory.berkeley.edu. Thank you so much for your reply. Name: Andrew Choi Internet Address: achoi@cory.berkeley.edu #include