[Coco] Re: Path command wasRe: OS-9 LVL II

KnudsenMJ at aol.com KnudsenMJ at aol.com
Sat Feb 19 15:45:07 EST 2005


In a message dated 2/19/05 3:11:25 PM Eastern Standard Time,  
kevdig at hypersurf.com writes:

>    In Unix (& Linux), path is NOT a command. It is a  feature of the 
>command interpreter (i.e. shell) and some of the exec  LIBRARY routines. 
>It is all built on the ENV variables that the Unix  process model 
>includes. Does OS9 have ENV?
OS9 6809 stock shell does not have ENV or anything like PATH, but the  rather 
popular ShellPlus replacement shell does support ENV variables.  As  does the 
Shell in OS9/68K.
 
> A shell is not the only place to launch a shell from.

This reminds me, that even under ShellPlus, if you type an executable  
program's name, ShellPlus knows how to hunt down the file via the dirs given in  the 
PATH variable.
 
But if a program tries to open a file by name, it is going thru the OS, but  
not the Shell, so PATH expansion might not be available.  The F$Open OS  call 
is restricted to what Microware built into OS9, and does not have access to  
the powers of ShellPlus.  Even the Linux C-Library open() command has  
limitations in this regard.
 
So if a Pascal or Basic09 program tries to execute another file, which is  
not in /dd/cmds, the PATH won't help.  PATH only works from the shell, as  in 
command line or script.  It *should* work right from a shell("command  string") 
or system("string") in Basic09 or C, since these invoke the  shell.  --Mike K.
 



More information about the Coco mailing list