At 11:45 AM -0700 9/26/02, [EMAIL PROTECTED] wrote:
>my $msg_file = File::Spec::VMS->catpath( $device, $dir, $file );
File::Spec->catpath should automatically pull in the VMS version, so
this is unnecessary but is not the cause of your problem.
>kite_hab15$ perl simple_log.pl
>msgdka100:[rsa.agent.bin]check-logs.txthandle= GLOB(0x814c2c)
>filename= dka100:[rsa.agent.bin]check-logs.txt
>fcntl(GLOB(0x814c2c), F_GETFL, etc.) fails: invalid argument
> at /perl_root/lib/site_perl/POE/Wheel/FollowTail.pm line 136
>POE::Kernel's run() method was never called.
>%SYSTEM-F-ABORT, abort
The fcntl() supplied with the C RTL does not have locking
capabilities, nor is the flock() function available. This is
something the configuration knows about itself, as the following
one-liners demonstrate:
$ perl -"MConfig" -e "print defined($Config{d_flock}) ? 'Yup' : 'Nope';"
Nope
$ perl -"MConfig" -e "print defined($Config{d_fcntl}) ? 'Yup' : 'Nope';"
Yup
$ perl -"MConfig" -e "print defined($Config{d_fcntl_can_lock}) ? 'Yup' : 'Nope';"
Nope
It's more than a bit ironic that an OS with such heavy-duty locking
capabilities does not have the lesser locking capabilities commonly
expected in C programs (and Perl programs that depend on the C
implementation). I'm not sure whether there are feasible
workarounds. If all it's doing is trying to keep the whole file to
itself, the C RTL already opens files for exclusive access by
default. If you wanted to make this explicit, an open like
use VMS::Stdio qw( &vmsopen );
$fh = vmsopen("myfile.dat", "shr=nil");
should do it.
--
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser