1752772 Members
4854 Online
108789 Solutions
New Discussion юеВ

Re: Spawn

 
SOLVED
Go to solution
faris_3
Valued Contributor
Solution

Re: Spawn



What is the definition of

$ show log lnm$temporary_mailbox /table=*


(should be LNM$JOB)


Heinz W Genhart
Honored Contributor

Re: Spawn

The logical name LNM$TEMPORARY_MAILBOX may point to LNM$GROUP.
So on such a system the users need the GRPNAM privilege to use the Spawn command.

Heinz

Re: Spawn

Hi,

As suggested by Homi, the assignment of the logical LNM$TEMPORARY_MAILBOX has been causing the problem.

$ sho log LNM$TEMPORARY_MAILBOX /table=*
"LNM$TEMPORARY_MAILBOX" = "LNM$SYSTEM" (LNM$SYSTEM_DIRECTORY)
1 "LNM$SYSTEM" = "LNM$SYSTEM_TABLE" (LNM$SYSTEM_DIRECTORY)

If I give the account the SYSNAM priv, the spawn command works...
After I redefined it to point to the job table, the unprivileged spawn worked.

There are several other projects running on the "problem" node - one of them must have configured/coded the re-assignment of this logical without knowing the impact.

However, can somebody tell me why this setting causes SPAWN to fail and the context i.e. parent process or sub-prcess context.
Thanks,

Petran.
Wim Van den Wyngaert
Honored Contributor

Re: Spawn

This is what the wizard says :

Normally, LNM$TEMPORARY_MAILBOX specifies LNM$JOB, the job-wide logical
name table; thus, only processes in the same job as the process that first
creates the mailbox can use the logical name to access the temporary
mailbox. If you want to use the temporary mailbox to enable communication
between processes in different jobs, you must redefine LNM$TEMPORARY_
MAILBOX in the process logical name directory table (LNM$PROCESS_
DIRECTORY), to specify a logical name table that those processes can
access.

For instance, if you want to use the mailbox as a communication device for
processes in the same group, you must redefine LNM$TEMPORARY_MAILBOX to
specify LNM$GROUP, the group logical name table. The following DCL command
assigns temporary mailbox logical names to the group logical name table:

$DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$TEMPORARY_MAILBOX LNM$GROUP

Because $QIOW is used for input and output rather than $QIO, both MAILS
and MAILR wait for I/O to complete before advancing to the next program
statement.

Wim : of course you need access to these logical name tables. That's why sysnam helps. Or putting an acl on the table.

Wim
Wim
Uwe Zessin
Honored Contributor

Re: Spawn

> "LNM$TEMPORARY_MAILBOX" = "LNM$SYSTEM" (LNM$SYSTEM_DIRECTORY)

Oh, great!!!

I bet you have a process control system in a manufacturing area that needs to run with all privileges :-(
.
Ian Miller.
Honored Contributor

Re: Spawn

An alternative would be to create a shared logical name table with appropritate ownership and protection and set LNM$TEMPORARY_MAILBOX to point to it.
____________________
Purely Personal Opinion

Re: Spawn

Hi,

Uwe - your guess was spot on... In the old days, every project had it's own VAX and they could do whatever they wanted with the machine but in todays phylosophy of cutting costs etc. they have to share the hardware amongst different projects. If the projects are setup properly, assigning this logical to LNM$GROUP should suffice....

Wim, I am/was aware of the existence and functionality of the logical LNM$TEMPORARY_MAILBOX - however I have trouble understandinghow the setting of this logical could lead to failure of the SPAWN command.

Thanks,

Petran.
Uwe Zessin
Honored Contributor

Re: Spawn

> however I have trouble understandinghow
> the setting of this logical could lead to
> failure of the SPAWN command

On my system, I see a logical DCL$ATTACH_pidOfMasterProcess in LNM$JOB after the SPAWN command.
.
faris_3
Valued Contributor

Re: Spawn

>Wim, I am/was aware of the existence and >functionality of the logical >LNM$TEMPORARY_MAILBOX - however I have >trouble understandinghow the setting of >this logical could lead to failure of the >SPAWN command.

DCL uses a temporary mailbox to communicate between the process and the subprocess.
Jan van den Ende
Honored Contributor

Re: Spawn

Petran,

to put in in clear words:

- The communication between a process and its (spawned) subprocess uses a temporary mailboxes
- Those processes "know" which mailbox to use by defining it in LNM$TEMPORARY_MAILBOX
- To define a logical name in a table you need WRITE access to that table
- SYSTEMwide or GROUPwide tables need SYSNAM or GROUPNAM privs to write to them.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.