dylan@cs.washington.edu (Dylan McNamee) (07/02/90)
I am writing a program using the Post1.1 library. It allows the programmer to supply an output file handle, so the messages from the interpreter can show up wherever you choose. I want this filehandle to be readable by my program (the same one that called up the post.library) so it can interact and recieve output from the interpreter. (Namely to get font widths into an internal array.) I tried making the post output filehandle be my program's input file, which presumably didn't work since Input is probably meant to be read only. I tried opening a file, passing the handle to post, then opening the same file, for read only, but the second open fails...one process per open file, I presume. Short of asking Adrian to rewrite the file-io interface (my next step...) can anyone think of a way to connect processes in this manner? It doesn't seem like it should be impossible, since I'm really not asking any more than having a pipe between post and me. ideas? anyone? anyone? (email please...) thanks dylan dylan@cs.washington.edu
jesup@cbmvax.commodore.com (Randell Jesup) (07/05/90)
In article <12432@june.cs.washington.edu> dylan@june.cs.washington.edu (Dylan McNamee) writes: >I want this filehandle to be readable by my program (the same one >that called up the post.library) so it can interact and recieve >output from the interpreter. (Namely to get font widths into an >internal array.) ... >Short of asking Adrian to rewrite the file-io interface (my next >step...) can anyone think of a way to connect processes in this >manner? It doesn't seem like it should be impossible, since I'm >really not asking any more than having a pipe between post and me. No problem. Use pipes. Open("PIPE:myfile",MODE_NEWFILE) to give to Post, and Open("PIPE:myfile",MODE_OLDFILE) for your program to read from. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup Common phrase heard at Amiga Devcon '89: "It's in there!"