mcr@julie.UUCP (Michael Richardson) (06/01/89)
I know that AmigaDOS doesn't support the duplication of FileHandles (which makes it rather difficult to pass a FileHandle to another process) [Yes, I know we've been through this before] but doesn't "run" have to do something of the sort to allow a "background" process write to the same window? This is essentially the type of thing that I want to do. Does an 'Open("*",MODE_OLDFILE)' find the current input, current window (pr_WindowPtr?), console task (pr_ConsoleTask) or what? In case anyone wants to know what I'm doing---email me. I'm afraid I'll get flamed otherwise. (Hint: Remember my posting about Manx && fexecv() && redirection? I never got an answer. :-) ) -- :!mcr!: Michael Richardson Amiga v--------+ UUCP: uunet!attcan!lsuc!nrcaer!julie!mcr | INTERNET mcr@doe.carleton.ca Fido: Michael Richardson @ 1:163/109.10<--+ Alter @ 7:483/109.10
dillon@HERMES.BERKELEY.EDU (Matt Dillon) (06/13/89)
: I know that AmigaDOS doesn't support the duplication of FileHandles :(which makes it rather difficult to pass a FileHandle to another process) :[Yes, I know we've been through this before] but doesn't "run" have to do :something of the sort to allow a "background" process write to the same :window? This is essentially the type of thing that I want to do. :Does an 'Open("*",MODE_OLDFILE)' find the current input, current window :(pr_WindowPtr?), console task (pr_ConsoleTask) or what? : : In case anyone wants to know what I'm doing---email me. I'm afraid I'll :get flamed otherwise. Yes, RUN and NEWCLI attempt to Open("*", 1005) by sending a DOS open packet with the filename '*' to the ConsoleHandler (or whatever the field is called) of the Process structure. You cannot duplicate this feat by Open("*",1005) as that is directed to the filesystem... you need to send the packet manually. The console device understands '*'. It knows which console to duplicate because each instance of the console device is a separate task (and this a different address for pr_Console[Task/Handler??]). I agree that we need a *real* Dup() call. -Matt
janhen@kunivv1.sci.kun.nl (Jan Hendrikx) (06/13/89)
In article <8906122232.AA02030@hermes.Berkeley.EDU> dillon@HERMES.BERKELEY.EDU (Matt Dillon) writes: > Yes, RUN and NEWCLI attempt to Open("*", 1005) by sending a DOS >open packet with the filename '*' to the ConsoleHandler (or whatever >the field is called) of the Process structure. You cannot duplicate this >feat by Open("*",1005) as that is directed to the filesystem... you need >to send the packet manually. Would this special casing of the * name not be done by Open(). You see, if you use the (Commodore-supplied, BCPL, non-Arp) Type command to type the file *, it really reads from the console window. So I'd think that the * is seen by Open(), and then directed to the default console handler for that Process. > The console device understands '*'. It knows which console to >duplicate because each instance of the console device is a separate >task (and this a different address for pr_Console[Task/Handler??]). > > I agree that we need a *real* Dup() call. Me too. We need to get rid of the entire concept of pr_ConsoleTask, since that is why you need to RUNBACK things from CLIs. > -Matt -Olaf Seibert (using Jan's account)
bryan@geo-works.UUCP (Bryan Ford) (06/19/89)
>: I know that AmigaDOS doesn't support the duplication of FileHandles >:(which makes it rather difficult to pass a FileHandle to another process) [etc etc] > I agree that we need a *real* Dup() call. > > -Matt We already have one. Well, sort of. I think. :-) :-) In TransAmi V2 I2, page 36 (in the article about file systems), there are five new ACTION types listed, which are used by Bill Hawes' ConMan. They all provide much needed functions. I can't find a good description for ACTION_DOUBLE (2000) anywhere, but from the inadequate description in TransAmi it looks like just what we need. There's also stuff to allow programs to put stuff on the input stream, as if it was typed in from the keyboard. Very useful for scripts. Unfortunately, this stuff is not standard (at least not yet), and will only work with ConMan. However, I would recommend to C-A that these packets be made standard and supported in future versions of the Amiga's console handler. Also, I'd like to see a packet type to find the number of characters waiting in the input buffer, and one to wait until at least one character is available and don't wait for more after that, but if more characters are available, stick them in too. In other words, "read at least 1 character". Bryan -- ____________________________________________ _/ Bryan Ford - bryan@geo-works.geo-works.com \_ _/ ..!utah-cs!caeco!i-core!geo-works!bryan \_ / ..!uunet!iconsys!caeco!i-core!geo-works!bryan \