[Coco] Major OS-9 discovery to enhance script file use.
tim lindner
tlindner at ix.netcom.com
Sun Jan 8 13:25:21 EST 2006
Robert Gault <robert.gault at worldnet.att.net> wrote:
> (chd /h0/MVUE)</1
I tested something like this on stock OS9 Level 2. I modified the
startup file to have this at the end:
(chd sys) </1
echo Success!
After it was done I got my prompt and did a PWD, and found my current
directory really was /DD/SYS. But the echo command did not execute.
When shell runs the startup file (or any script) it forks a sub shell,
changing directories in that sub-shell will not effect the parent shell.
Period.
What you have found is a way to crash the sub shell, and exeucte the CHD
command in the parent shells process. I think it crashes becuase you are
trying to redirect the STDIN of a built in shell command.
> (display 1b 21)</1
This works becuase you dup STDOUT and assign it to STDIN. This works
around a bug in Select when STDIN is an RBF path. Note, this does not
crash the sub-shell.
--
tim lindner
tlindner at ix.netcom.com Bright
More information about the Coco
mailing list