[comp.sys.amiga.programmer] Curr dir/exiting pgm/Shell

Mike.Wilkins@f55.n282.z1.fidonet.org (Mike Wilkins) (01/24/91)

  I'm writting a program that runs from Shell, and upon exiting the 
program, leaves the user in a different dir. I've used the chdir() 
command to change dirs.
  The problem is that allthough the directory does change, the path
name on the Shell prompt remains at the old dir path.
  I've tried Lock() to lock the old & new dirs, then CurrentDir()
to switch them. Same results, and the system gurus sometimes.
This is beginning to be a real thorn. I'm sure the answer is very 
simple to you Amigaized C programmers. Could someone please HELP?

andy@cbmvax.commodore.com (Andy Finkel) (01/26/91)

In article <0.279F38E9@mmug.mn.org> Mike.Wilkins@f55.n282.z1.fidonet.org (Mike Wilkins) writes:
>  The problem is that allthough the directory does change, the path
>name on the Shell prompt remains at the old dir path.

Under 2.0, you would call the SetCurrentDirName() function.

Under 1.3 you are going to have to change it in the process structure itself.

Take a look at the structure definition in the dos include files before
you begin.

Make sure you do it under Forbid()/Permit() just in case someone else
is looking at your process structure :-)

			andy
-- 
andy finkel		{uunet|rutgers|amiga}!cbmvax!andy
Commodore-Amiga, Inc.

"God was able to create the world in only seven days because there
 was no installed base to consider."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.