> I tracked it down in the code and I know why it's happening. The majordomo
> script calls the shlock routine lopen() to open the list file for append access
> and then procedes to call is_list_member() for the file which then opens the
> file for input. To refresh your memory, here is an excerpt from majordomo.
Uh huh.
> change it. Could you please tell me if you know of any other places in the code
> where this technique is used? I am worried that the same thing might be hidden
I think most, if not all, of the file operations are done this way.
Since VMS doesn't allow concurrent access to a file (!), you can
likely get rid of the first call to lopen() and have it work fine.
> Please correct me if I'm wrong, the race condition mentioned in the comments is
> two or more majordomo processes all trying to access the list file, no? You
> prevent it by calling lopen() to lock the file so that the second process blocks
> until the lock is released, no?
Ummm, mostly no, yes. Or would that be yes, mostly no? ;-? 'ja?
One race condition exists for multiple MDs accessing the same list,
correct.
Another race condition, which I don't think is likely, is a security
race. That applies mostly to privileged processes...
--Chan
References:
|
|