[prev in list] [next in list] [prev in thread] [next in thread] 

List:       majordomo-workers
Subject:    Re: error in majordomo
From:       Dave Wolfe <dwolfe () risc ! sps ! mot ! com>
Date:       1997-07-21 16:25:00
[Download RAW message or body]

[ Bert Vortman writes: ]
> 
> While porting majordomo to the Amiga I found a small error in
> majordomo. in the subroutine 'sub do_unsubscribe' around line
> 455 the LIST is not closed properly (opened by &lopen(LIST, "",
> "$listdir/$clean_list")...etc ) I suspect that it won't give any
> problems in a Unix environment, but it gave me some headaches when
> using it in a Amiga environment. so adding close (LIST) right after
> the close(NEW) will do the trick:
> 
>     close(NEW) || &abort("Error closing $listdir/$clean_list.new: $!");
>     close(LIST) || &abort("Error closing $listdir/$clean_list: $!");

You're going to have to post some context. What version of Mj are you
porting? If it's 1.94.3 and I understand you correctly, you're breaking
the lock on the list before you're finished processing the command. Note
that after the end of the block following the "close(NEW)" (and the
sundry 'elsif' and 'else's), around line 487, there are the lines:

486             unlink("$listdir/$clean_list.new");
487             &lclose(LIST);

Thus LIST *does* get unlocked and closed properly, after all the
processing that expects it to be locked is completed. Also note that
just using close(), as opposed to lclose(), on a file opened via lopen()
will cause you other problems.

What was the nature of the "headaches" you were having and perhaps
someone on Mj-workers could propose a workable fix?

-- 
 Dave Wolfe

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic