From: | rorydawson2000 |
Date: | 10 Aug 2001 at 01:50:47 |
Subject: | [amiga-c] System paths and child processes |
Hello all,
I would like to create a child process from my program which
will run an external program. I want the user to be able to
type in the program name as they would do in the shell in other
words without giving an explicit path to the executable but
just the name if the executable happens to be in the system
path list.
My problem is that I can't get the start code to respect
the system paths. The process does not have all the system
paths set. I have come up with a hack to write out a script
file to t: and to execute it, with the script file doing
'PATH ADD <xxxxx>' whereby <xxxxx> was obtained by scanning
all the running CLI's before calling the program. It seems
to work but I don't like it as its too slow and this
is certainly not want other programs would be doing.
Do child processes inherit the system path list?
How do you tell a child process to respect the system
paths?
Do I need a shell for this? If so, how do I open the shell
but have its window not open unless its needed? I don't
mind a new shell process running for the program but I don't
want it to open a window if it doesn't do output to the window.
Which system function should I use to create the process?
There are so many of them and they all seem to have there
own different ways of workings.
Any help greatly appreciated!
TIA
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/dpFolB/TM
---------------------------------------------------------------------~->
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/