Kevin writes:
> callci "mympe '$$ other parms'"
>
> passing in the shell's pid to the mpe process
> and mpe creating R###### for the response file.
There's one small gotcha in this. On Unix, $$ gets you the "PID" (Process
ID) of the process which is conceptually the same as the MPE "PIN" (Process
Identification Number). But on MPE it turns out that MPE/XL and /iX also
have a concept of a PID in addition to the 16-bit PIN you're probably most
familliar with. In fact the Process Management system of MPE internally
uses this 32-bit PID value, even though hardly any MPE commands display PID
(everyone was used to the old 16-bit PIN so that's what is generally
displayed by Glance, :SHOWQ, :SHOWPROC, etc.).
But when MKS (or whomever) came along to implement $$, ps(1), and so forth
for the MPE Posix environment, they asked for "PID" (since that was the Unix
term for PIN) and, guess what, the MPE Posix commands and the shell's $$
return the MPE internal PID rather than the PIN.
Why should you care? After all, there's a 1:1 mapping between PIN and PID
at any moment in time, so the values are pretty much interchangeable. The
PID has the advantage that it includes a reuse-counter, so you'll never have
duplicate PID values between reboots (or at least not for quite a long
time).
The problem is that the PID is a 32-bit value, and as such generally
converts to a number that's too long to fit into an MPE 8-character
filename, unlike the smaller 16-bit PIN.
So rather than the convenient MPE "R######" kind of name, you need to use a
Posix name (that can be longer than 8 characters) for your temp files if you
want to get the PID ($$) value into them.
G.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|