[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: es %dup
| The case in question involves re-defining unit 0, which isn't something
| for which you could substitute re-defining any arbitrary unused descriptor.
| I start with unit 0 open on a streams pipe, and need to have the tty open
| on 0 before executing interactive commands.
Yes, but those are all special cases that can be handled by a more
general scheme. It's the meaning of syntactic sugar that is under
discussion. I thought you were suggesting that ``exec <foo'' should
mean ``push foo onto input'', as opposed to ``set input to foo''.
(I think there should be two operators for those two concepts.)
When you wrote
``So, after the "exec <foo", an application
invoked by es should find "ls" on its input
stream, but the next es command still should come
from the original command input stream.''
I interpreted that as asking for something like setting a default
redirection on future commands, something analgous the common-lisp
(with-open-file (*standard-input* "foo")
(my-cat)
)
Is that right?
| I have to admit I don't know how perl and tcl would deal with this issue,
| so I'm unable to picture exactly what kind of functionality you mean.
They can do what you can do in C. You should have direct access to
open, close, read, write, etc.