how to put a program into .plan file
Matthew Farwell
dylan at ibmpcug.co.uk
Sat Sep 29 03:23:15 AEST 1990
In article <10511 at panix.UUCP> jsb at panix.UUCP (J. S. B'ach) writes:
>In article <2782 at idunno.Princeton.EDU> subbarao at phoenix.Princeton.EDU (Kartik Subbarao) writes:
>)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.
>
>And does this C program run all the time checking? Or does it sleep
>until fingered? Even in the latter case some system resources are
>permanently tied up. Now (as Emanuel Kant might say) if everyone were
>to do this, the entire process table would fill up!
No. If you write on a pipe with noone at the other end, then the process
blocks (doesn't do anything), until someone starts reading from the pipe.
I had a similar version to r$'s running on this machine for about 8 hours
and it consumed 0.00 cpu seconds (according to ps). The process only takes
up cpu if someone fingers you.
Dylan.
--
Matthew J Farwell | Email: dylan at ibmpcug.co.uk
The IBM PC User Group, PO Box 360,| ...!uunet!ukc!ibmpcug!dylan
Harrow HA1 4LQ England | CONNECT - Usenet Access in the UK!!
Phone: +44 81-863-1191 | Sun? Don't they make coffee machines?
More information about the Comp.unix.programmer
mailing list