[ic] Error in UserTag with open

Dan Browning interchange-users@interchange.redhat.com
Tue Nov 27 15:51: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

See if this reading illuminates anything:

http://interchange.redhat.com/cgi-bin/ic/dev-4.8/ictemplates_12.html

http://interchange.redhat.com/cgi-bin/ic/dev-4.8/ictemplates_15.html

http://interchange.redhat.com/cgi-bin/ic/dev-4.8/ictags_89.html

HTH,

Dan Browning
Kavod Technologies