This report confirms my suspicion that 'flock' is implemented using 
'fcntl' under the Sun OS. I will upload a new Tarpit version sometime 
today that has all lock testing modified to accomodate the 
shortcomings of fcntl advisory locking. Unfortunately, it will be 
untest, but should work as long as there are not typo's unique to 
Sun.

For others that may like to know, 'fcntl' advisory locking uses 
the pid to keep track of who has the file discriptor locked. Lock 
testing can be done by running the test in a child process as follows

exclusive_advisory_lock(FILE,'TestFile'')
local TEST;
if(open(TEST,'-|')) {
  print (<TEST>);
} else {  # in child
  # set timeout and alarm elsewhere
  attempt_lock(HANDLE,'TestFile'
  print "unwanted lock succeeded\nnot "
    unless $@;
  print "ok $test\n";
  exit;
}
$test++;
close TEST;
close FILE;

Thanks for the report and your assistance.
Michael
> -- 
> This is an error report generated automatically by CPANPLUS.
> Below is the error stack during 'make test':
> 
> make[1]: Entering directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/DShield'
> make[1]: Leaving directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/DShield'
> make[1]: Entering directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/Get' make[1]:
> Leaving directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/Get' make[1]:
> Entering directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/Report'
> make[1]: Leaving directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/Report'
> make[1]: Entering directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/Util'
> make[1]: Leaving directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/Util'
> PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/append_open.........ok t/cull_threads........ok
> t/daemon_handler......ok t/dshield.............ok
> t/fetch...............ok t/find_old_threads....ok
> t/log2_mem............ok t/port_stats..........ok
> t/prep_report.........ok t/process_log.........ok
> t/reap_kids...........ok t/util................ok
> t/write_restore.......ok All tests successful. Files=13, Tests=663,
> 16 wallclock secs ( 2.37 cusr +  0.75 csys =  3.12 CPU) make[1]:
> Entering directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/DShield'
> PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
> t/chk_config....ok t/deliver.......ok t/move2_Q.......FAILED test 5
>  Failed 1/18 tests, 94.44% okay
> Failed Test Stat Wstat Total Fail  Failed  List of Failed
> --------------------------------------------------------------------
> ----------- t/move2_Q.t               18    1   5.56%  5 make[1]:
> Leaving directory
> `/net/sunu991/disc1/.cpanplus/build/LaBrea-Tarpit-1.07/DShield'
> Failed 1/3 test scripts, 66.67% okay. 1/52 subtests failed, 98.08%
> okay. make[1]: *** [test_dynamic] Error 29 make: *** [test] Error 2
> 
> 
> Additional comments:
> 
> 
> 
> --
> 
> Summary of my perl5 (revision 5.0 version 8 subversion 0)
> configuration:
>   Platform:
>     osname=solaris, osvers=2.8, archname=sun4-solaris
>     uname='sunos sunu991 5.8 generic_108528-14 sun4u sparc '
>     config_args='-de'
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef
>     usemultiplicity=undef useperlio=define d_sfio=undef
>     uselargefiles=define usesocks=undef use64bitint=undef
>     use64bitall=undef uselongdouble=undef usemymalloc=n,
>     bincompat5005=undef
>   Compiler:
>     cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include
>     -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O',
>     cppflags='-fno-strict-aliasing -I/usr/local/include'
>     ccversion='', gccversion='3.0', gccosandvers='solaris2.8'
>     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
>     d_longlong=define, longlongsize=8, d_longdbl=define,
>     longdblsize=16 ivtype='long', ivsize=4, nvtype='double',
>     nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8,
>     prototype=define
>   Linker and Libraries:
>     ld='gcc', ldflags =' -L/usr/local/lib '
>     libpth=/usr/local/lib /usr/lib /usr/ccs/lib
>     libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
>     perllibs=-lsocket -lnsl -ldl -lm -lc
>     libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
>     gnulibc_version=''
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
>     cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
> 

Reply via email to