[comp.sys.amiga.programmer] WB2.0 SysTagList

wolff@pbinfo.uni-paderborn.de (Marcus Horstmann) (05/28/91)

Hi,

I have a problem with the DOS-funktion Systaglist (older: System). It uses an own process for its work, so the shellrelated stuff like cd, prompt and so forth won't work correctly, i.e. a shell-script that puts me in a directory and leaves me there, works, but after Systaglist is completed I am back in my proccesec own currentDir.

So the question: How can I get the currentdir Systaglist uses at last?

I have tried it with the exitcodetag, but when the exitcode is run, it returns me
only a NIL(NULL)-lock from its processes currentdir. How can I get the correct one?

How works the Systags CustomShell and Usershell?

Thanx in advance

   Marcus

=======================================================================
==                         mail :  Marcus Horstmann                  ==
==       //  Amiga                 Liboriberg 22                     ==
==      //     is                  W-4790 Paderborn                  ==
==  \\ //     FUN!                 Germany                           ==
==   \X/   (Isn't it?)     Tel. :  ++49-5251-27406                   ==
==                         email:  wolff@uni-paderborn.de            ==
=======================================================================
 

jesup@cbmvax.commodore.com (Randell Jesup) (05/29/91)

In article <1991May28.120933.4547@uni-paderborn.de> wolff@pbinfo.uni-paderborn.de (Marcus Horstmann) writes:
>I have a problem with the DOS-funktion Systaglist (older: System). It uses
 an own process for its work, so the shellrelated stuff like cd, prompt and
 so forth won't work correctly, i.e. a shell-script that puts me in a 
 directory and leaves me there, work
s, but after Systaglist is completed I am back in my proccesec own currentDir.
>
>So the question: How can I get the currentdir Systaglist uses at last?

	First: hit return every so often when typing.

	Second:  System() is doing what it's supposed to.  If you want to 
find out about where the new process was at the end of it's execution, have it
echo the current directory into a file and read it from there.  For example:

	System("execute myscript\n cd >t:mycd",NULL);

>I have tried it with the exitcodetag, but when the exitcode is run, it returns me
>only a NIL(NULL)-lock from its processes currentdir. How can I get the correct one?

	That's because the shell unwinds a number of things before the process
dies, including current directory.

>How works the Systags CustomShell and Usershell?

	UserShell invokes the prefered user shell instead of the default boot
shell.  It's possible to install specially-written shells (such as wshell)
which the user prefers for interactive usage.  THey come up when you click
on the Shell icon, etc.  However, since we don't want programs that call
Execute() or System() with hard-coded command lines to break, the default
shell for those is the boot shell (from the rom).  With System() you can
override this with SYS_UserShell.  SYS_CustomShell takes a string as an 
argument, which is the name of the shell to use (from the resident list).
This was for things like makefiles or other such which may need a specific
shell, even if the user is currently using a different shell.

	All the information to write custom/user shells is not out yet.  I'll
probably write an article on it for this years devcon.

-- 
Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Disclaimer: Nothing I say is anything other than my personal opinion.
"No matter where you go, there you are."  - Buckaroo Banzai