[comp.os.vms] spawn from a detached process

thompson@batcomputer.tn.cornell.edu (Steve Thompson) (06/26/88)

In article <8806231126.AA14324@ucbvax.Berkeley.EDU> GHC@NIHKLMB.BITNET writes:
>Subj: Spawn from detached process
>
>I am trying to spawn a subprocess in order to submit a batch job from a
>detached process.  The call to lib$spawn returns with LIB$_NOCLI.  I have
>tried the same sequence from an interactive process with success.  I have
>checked tha process quotas for the detached process and it has 2 subprocesses
>permitted.  The spawn command is on the next line
>
>           ok = lib$spawn( full_spawn_cmd(1:full_spawn_cmd_l) )
>

A detached process does not have a command language interpreter unless the
first image that it runs is sys$system:loginout.exe, because that is the
image that maps the CLI into the address space of the process. The easiest
thing to do here is to specify loginout as the image, and some command
procedure as the sys$input; that command procedure runs the image. You'll
then be able to lib$spawn and some of those other neat lib$ things.