[comp.os.vms] Changing symbol info in spawned processes

daffy@warwick.UUCP (Steve Hunt) (06/07/87)

Ho there,

I would like to modify my prompt in spawned subshells, particularly
from Eve.  Is there an easy way to do this?  The reason I want this
facility is so that I do not type "lo" one too many times and find
myself logging in again!

The sort of thing I want is...

STEVE> eve foo.foo
.... uses Eve and then spawns
STEVE>> .... note different prompt....
STEVE>> spawn
STEVE>>> etc etc

Clearly I can use a DCL file for the case when I type SPAWN at the
command line, but how can I make Eve's spawn facility do it?

I expect this is a trivial question but I am relatively new to VMS!


Thanks in anticipation,

			Steve.
-- 
++ Steve Hunt ++ daffy@warwick.UUCP ++

Copyright (C) 1987 Steve Hunt - permission granted to profit from this as
long as I get a 10 percent kickback :-)

LEICHTER-JERRY@YALE.ARPA.UUCP (06/11/87)

    I would like to modify my prompt in spawned subshells, particularly
    from Eve.  Is there an easy way to do this?  The reason I want this
    facility is so that I do not type "lo" one too many times and find
    myself logging in again!
    ...

The LIB$SPAWN primitive, and the DCL SPAWN command, have a /PROMPT qualifier
that allows you to specify the prompt for the newly-created subprocess.  Un-
fortuately, the TPU SPAWN primitive, which EVE uses, doesn't provide this
option.

There are two alternatives:

	1) By using TPU's callable interface, it's possible to combine code
	   written in any standard VMS language with TPU code.  This code
	   can be called back to, so can provide an interface to LIB$SPAWN
	   that allows the prompt to be set.

	2) I have the following definition in my LOGIN.COM file:

		$ POP == "IF F$GETJPI("""",""OWNER"") .NES. """" THEN LOGOUT"

	   The POP command in a subprocess logs you out.  The POP command in
	   a top-level process is a no-op.  Then all you have to do is disci-
	   pline yourself to always type POP unless you really WANT to log
	   out of the system.

While alternative 1 is certainly do-able, I think you'll find alternative 2
a LOT easier, and just as effective!
							-- Jerry
-------

carl@CITHEX.CALTECH.EDU (Carl J Lydick) (06/17/87)

 > I would like to modify my prompt in spawned  subshells,  particularly  from
 > Eve.   Is there an easy way to do this?  The reason I want this facility is
 > so that I do not type "lo" one too many times and find  myself  logging  in
 > again!

It took me a while to realize that  nobody  responded  to  Steve  Hunt's  REAL
question,  and  that  somebody  should.   He really wants to avoid killing his
top-level process, and setting the DCL prompt was simply a perceived means  to
that end.  Since he appears generally to use the "logout" command to terminate
his current process, executing the command
        $ SET COMMAND/DELETE=(LOGOUT,EOJ)
in his LOGIN.COM should solve his problem.  In order to log  the  top  process
out, he has his choice of "$ RUN SYS$SYSTEM:LOGINOUT" or "$ STOP/ID=0".  Since
spawning  a subprocess entails reading the CLI table again, the LOGOUT and EOJ
commands will still work for all but the top-level process.