Re: PERL_VMS_POSIX_EXIT (Re: Q: Can anyone explain this cursious behaviour.)

2014-07-22 Thread Craig A. Berry

On Jul 21, 2014, at 7:41 PM, John E. Malmberg wb8...@qsl.net wrote:

 On 7/21/2014 7:06 PM, Craig A. Berry wrote:
 
 DECC$FILENAME_UNIX_REPORT has nothing at all to do with exit statuses.

Well, I wouldn't think it did, but for some reason the two are wired together:

s = decc$feature_get_index(DECC$FILENAME_UNIX_REPORT);
if (s = 0) {
decc_filename_unix_report = decc$feature_get_value(s, 1);
if (decc_filename_unix_report  0) {
decc_filename_unix_report = 1;
vms_posix_exit = 1;
}
else
decc_filename_unix_report = 0;
}

I think I'm going to regard that as a bug and separate them.

 
 The perlvms documentation needs to be updated.
 
 http://perldoc.perl.org/perlvms.html
 
 The PERL_VMS_POSIX_EXIT needed to be 1 to get it active.  ENABLE did not 
 work.  Perl VMS documentation only mentions ENABLE

The problem is that for this feature and several others we have code that looks 
like:

status = simple_trnlnm
(PERL_VMS_POSIX_EXIT, val_str, sizeof(val_str));
if ($VMS_STATUS_SUCCESS(status)) {

but simple_trnlnm does not return a VMS status.  It returns zero on failure or 
the length the equivalence name on success. 1 has an odd length and is 
considered a success; ENABLE has an even length and is considered a failure.  
That is definitely a bug, apparently one I introduced at 
http://perl5.git.perl.org/perl.git/commit/8dc9d3390b257b55ff81dfb908f4621b80760d78?f=vms/vms.c.
  Sorry about that.  I will fix it soonish, possibly even in time for 5.20.1.



Craig A. Berry
mailto:craigbe...@mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser



Re: PERL_VMS_POSIX_EXIT (Re: Q: Can anyone explain this cursious behaviour.)

2014-07-22 Thread John E. Malmberg

On 7/22/2014 7:13 AM, Craig A. Berry wrote:


On Jul 21, 2014, at 7:41 PM, John E. Malmberg wb8...@qsl.net wrote:


On 7/21/2014 7:06 PM, Craig A. Berry wrote:


DECC$FILENAME_UNIX_REPORT has nothing at all to do with exit statuses.


Well, I wouldn't think it did, but for some reason the two are wired together:


The idea was that if you wanted UNIX filenames, you would also want UNIX 
exit statuses.



I think I'm going to regard that as a bug and separate them.


The logical GNV$UNIX_SHELL is defined when bash is running.  It should 
be causing PERL_VMS_POSIX_EXIT to be in effect.  That does not seem to 
be working on encompasserve.org.


Regards,
-John