how to put a program into a .plan file

steinbeiser rgs at bbt.UUCP
Thu Sep 27 04:49:58 AEST 1990


>% /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 at rti.rti.org
  BroadBand Technologies		Bitnet   - rgs%bbt%rti.rti.org at CUNYVM
  Research Triangle Park NC	        Usenet   - !mcnc!rti!bbt!rgs
  (919)-544-6850 X255



More information about the Comp.unix.programmer mailing list