[Tutor] pass argument into running program *outside* of program
Emile van Sebille
emile at fenx.com
Fri Aug 22 20:05:12 CEST 2008
Lie Ryan wrote:
>
> In a much simpler situation, even a communicating from a plain file
> could be enough. In the daemon's program folder, there'll be two files:
> input and output. You write to input to instruct the server and read the
> response from output. This model is in respect to Unix's philosophy:
> "make program to handle text streams, because it's the universal
> interface".
>
I've done this and it works well... one thing to watch out for though is
snagging a file before it's completely written. Setting up a semaphore
or pausing to allow the file write to complete once seeing the file
fixes it adequately.
Emile
More information about the Tutor
mailing list