> 
> First off, why write your own when you can use VMS::Process?
> Secondly, VMS::Process handles JPI$_MODE just fine, so it's clearly
> possible from XS:
> 
> $ perl -"MVMS::Process" -e "print VMS::Process::get_one_proc_info_item(0,'MODE');"
> INTERACTIVE

I'm still working on VMS::Logical, and I want to check interactivity
to know whether to call lib$set_logical() or sys$crelnm().  I'll check
privs with the same call to know what access modes the caller is
capable of.

I didn't realize that VMS::Process already did this, but I'd still
rather put my simple check inside of VMS::Logical than require another
module that's only peripherally related.
 
> Is specifying a place to store bytes transferred really optional?  In
> any case it doesn't cost much to create another unsigned short and
> point to that; that way you can check and see if you really got a
> 4-byte answer in mode or no answer at all.
> 
> You definitely need to check iosb.lo even if status is successful.
> And, as I said above, it would be helpful to know whether you're
> really getting something written to mode, or if mode just happens to
> be zero before and after the call.

Ok, I took these two suggestions and added them to my output:

status = %X00000001   mode = 0
iosb.lo = %X00000001   modelen = 4

I'm not sure what the iosb is supposed to look like, so I output it as
hex.  The result looks the same as a straight call from C (except for
the mode, of course).

> >This is with Perl 5.6.0 on OpenVMS Alpha V7.3.
> 
> Any reason not to use 5.6.1?

I'm doing my non-work-related development on a publically-accessible
machine so I can share with you all.  I can ask the administrator to
upgrade but I kind of already feel he's bending over backwards for me.

I'll check on 5.6.1 when I get to work.

--
| Forrest Cahoon      | [EMAIL PROTECTED] |------------------------------|
| 850 21st Ave SE     |----------------------| Only unbalanced people       |
| Mpls MN  55414-2514 |                      |        can tip the scales... |
 

Reply via email to