[ic] Error in UserTag with open

Tonio Polia interchange-users@interchange.redhat.com
Tue Nov 27 15:01:01 2001


Hi, I wuold like to use a UserTag ..
but interchange server, when I start it, say this:


#####start of message #####
Configuring catalog test1...Using MySQL, DSN=dbi:mysql:test_test1.
UserTag 'bs_prepare' subroutine failed safe check: open trapped by operation
mask at (eval 140) line 12, <CONFIG> line 46.

In line 46 of the configuration file 'usertag/bsella':
UserTag bs-prepare Routine <<EOF

UserTag 'bs_confirm' subroutine failed safe check: open trapped by operation
mask at (eval 142) line 20, <CONFIG> line 98.

In line 98 of the configuration file 'usertag/bsella':
UserTag bs-confirm Routine <<EOF
####end of message #########

the UserTag say this:

####start
UserTag bs-prepare Routine <<EOF
sub {
    ..... some code ... declaration of some variable
    open (FH, "+< $Vend::Cfg->{VendRoot}/$::Variable->{BS_OTP_RIC}") or die
"Can't open file: $!";
    flock(FH, 2) or die "Can't flock: $!";  # 2 = exclusive lock
    while ( <FH> ) { $otp=$_; $addr = tell(FH) unless eof(FH); }
    truncate(FH, $addr);
    flock(FH, 8) or die "Can't unlock: $!";  # 8 = unlock
    close(FH);
    chomp $otp;

    some pieces of code, it is right

    open(FH, "$Vend::Cfg->{VendRoot}/$::Variable->{BS_OTP_RIC}") or die
"Can't open file: $!";
    while (sysread FH, $buffer, 4096) {
        $lines += ($buffer =~ tr/\n//);
    }
    close(FH);

    another piece of code .... and at the end ...

    return '';
}
EOF

####end

bis bald
    Tonio

-----------------------------------------------------------------
I Still See Her Face
As Beatiful As Day
It's Easy To Remember
Remember My Love That Way
All I Hear Is That Lonesome Sound
The Hounds Of Winter
They Follow Me Down
                (Sting, "The Hounds Of Winter")
-----------------------------------------------------------------

Tonio  "RedFox"  Polia
ICQ #: 47373366
e-mail:redfox@dag.it