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

List:       exim-users
Subject:    Linux flock patch
From:       jhenders () bogon ! com (John Henders)
Date:       1996-05-20 12:56:25
[Download RAW message or body]


I discovered there was only 1 place that needed fcntl changed to flock
to work, in db.c Several tests locally don't reveal any problems and my
database lock errors are gone.


*** db.c~       Mon May 20 05:53:39 1996
--- db.c        Mon May 20 05:45:48 1996
***************
*** 62,70 ****
--- 62,76 ----
  interlock with newer ones - and that happens as you change over. So instead
  the BSDI os.h file defines USE_DBM_DIRFNO, which causes dbhdr.h to define a
  macro that turns dbm_pagfno() into dbm_dirfno(). */

+
+ #if defined (__linux__)
+ while (flock(dbm_pagfno(dbm), LOCK_EX, &lock_data) < 0)
+ #else
  while (fcntl(dbm_pagfno(dbm), F_SETLK, &lock_data) < 0)
+ #endif
+
    {
    if (lock_count++ > DB_LOCK_RETRIES)
      {
      log_write(LOG_MAIN, "Failed to get %s lock for %s\n",

-- 
      Artificial Intelligence stands no chance against Natural Stupidity.
                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*

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

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