[PATCHES] CTDB - fix PID file problem

Martin Schwenke martin at meltin.net
Wed Jul 2 03:56:43 MDT 2014


2 patches:

* ctdb-daemon: Check PID in ctdb_remove_pidfile(), not unreliable flag

  If something unexpectedly uses fork() then an exiting child will
  remove the PID file while the main daemon is still running.  The real
  test is whether the current process has the PID of the main CTDB
  daemon.

* ctdb-daemon: Remove ctdb->ctdbd_pid, just use ctdbd_pid

  The global variable is needed anyway so just use it.

  The setting of ctdb->ctdbd_pid in ctdb_start_recoverd() is redundant,
  so is simply removed.

Please review and push if OK.

These patches are in my ctdb branch:

  http://git.samba.org/?p=martins/samba.git;a=shortlog;h=refs/heads/ctdb

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb.patches
Type: application/octet-stream
Size: 5989 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140702/303a4f41/attachment.obj>


More information about the samba-technical mailing list