On Wed, 25 Jul 2001, Craig A. Berry wrote: > The following recently added tests: > > lib/Test/Simple/t/exit.t > lib/Test/Simple/t/simple.t > > are currently failing on VMS. At least one of the issues is that some of > the tests expect a non-zero exit status from a child process to be preserved > whole in the parent process upon return from running Perl from a system() > call. That would be the normal order of things on VMS if it weren't for the > fact that the status value is shifted left by 8 bits. My understanding is > that there is some POSIX standard whereby the first byte has to be left free > for the system to talk to itself about what it's doing to your program, so > we emulate this behavior by doing the left shift. > > But on VMS all 32 bits of a status value are significant, so if you did > the shift by itself you would've just knocked a byte off the other end that > you more than likely really needed to make sense of your status. Charles > Bailey's solution was to take the only field in the 32-bit structure that > can be made sense of by itself (the severity bits) and keep only that. The > alternative was to have 24 bits of a 32-bit structure which, when shifted > back right by 8 bits, would be just fine about 60% of the time but completely > wrong about 40% of the time because of the lost byte. > > I assume I will just have to skip these tests on VMS and try to document > somewhere that using exit statuses the way these tests use them is > non-portable, but I thought I would explain the situation and see if anyone > has a better idea. Might there be a way to stick an appropriate C<use vmsish qw(exit);> or somesuch into there so as to make the tests pass? Peter PrymmerThread Previous | Thread Next