[evla-sw-discuss] flock() removed from Redhat kernel

James Robnett jrobnett at aoc.nrao.edu
Tue Aug 31 17:36:59 EDT 2004


   Redhat has apparently decided to remove the BSD flock() function call as of 
their latest version of Redhat Enterprise V3 update 2 kernel (2.4.21-15.EL)

    Below is a 'discussion' at redhat's bug repository with respect to the
vacation program (an affected program).
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=123415

    Programmers definitely should not have been using flock() in an NFS 
environment (and possibly not at all).   The POSIX fcntl() is the 'preferred'
method.   The notes section of the flock() man page have made this fairly
clear for quite some time.

    It is quite likely that we will someday be using Redhat's kernels and that
we have code that uses flock().   The good news it will be extremely easy
to located the code, the bad news is it will noticeable in the way the code
fails rather non-gracefully.

    Whether Redhat should have summarily removed flock() and/or announced
it more effectively is a different topic of discussion.  (yes to both IMO)
   
    Here's an additional URL for the terminally curious.
http://sourceforge.net/mailarchive/forum.php?thread_id=4784837&forum_id=4930

   The problem has been looming for almost 7 years ever since the the move 
*away* from flock being a call to fcntl.  This was removed from the linux 
kernel in an effort to fix some software, notably sendmail/GDBM which hadn't 
counted on people doing something so silly.

    I vaguely remember the problems then ....
 http://www.ussg.iu.edu/hypermail/linux/kernel/9605/2801.html

    This won't affect us until we move (if we do move) to Redhat Enterprise
sometime next year.   

    Eric's checked and AIPS seems to be ok.

James Robnett  (don't shoot me I'm just the messenger).

ps:  Please let others know who might be affected

pps:  CC'ing Jeff since he knows more about linux file locking than anyone
I personally know.   




More information about the evla-sw-discuss mailing list