Finally back after the weekend.
On 2005-01-23, Olegil at home wrote:
But what can you do? Is there a good way in AmigaOS to
say "I want to run
this application, and this file descriptor (which I have open for writing)
will be the stdin, and THESE file descriptors (which I have open for
reading) will be stdout/stderr".
The closest in 3.x would be dos.library/System() which specifies a command
to run and a taglist which can specify e.g. stdin, stdout and the shell
under which to execute the process.
Unfortunately, this seems to be a bit like implementing the C system() call
using the C system() call....
It would probably work under AmigaOS by passing all programs to the built-in
shell - but it would be a bit of a kludge.
All in all I think the dos.library/CreateNewProc() call would be more
appropriate for a shell.
And if so, does it port well into POSIX?
Kind of - it is probably quite easy to write a _small_ wrapper to get
the same functionality under a posix system.
If you don't get what I'm hinting at here,
I'm actually suggesting writing
a shell from scratch, AND making it portable :-P
Not a bad idea, but I think we should focus on writing an intepreter first.
(Ok, what I really mean is that we should not spend any time now on handling
command completion, history management etc. - an intepreter can probably work
as a shell with no command-line features)
-Peter aka. Archprogrammer
Reality is for people who cannot face ScienceFiction.
Only lefthanded people are in their right minds.