[lvm-devel] [PATCH] dmeventd -R (restart; BZ 454618)
Petr Rockai
prockai at redhat.com
Wed Oct 6 14:07:13 UTC 2010
Hi,
Alasdair G Kergon <agk at redhat.com> writes:
>>> + kill(pid, 9);
>
> I'm paranoid about code like that, and want to see everything reasonably
> possible done to ensure it can only kill the process it should and
> any possible races are clearly documented and defended against.
the attached version avoids the kill, instead relying on the remote end
committing suicide upon a special DIE message. It turns out to simplify
the code as well, at the expense of having to modify the lock-file
function slightly (it now tries a little harder, waiting for a couple
seconds before failing, periodically re-trying to grab the lock). This
also addresses some (all?) of the races.
Yours,
Petr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmeventd-restart.diff
Type: text/x-diff
Size: 13298 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20101006/6f8a6340/attachment.bin>
More information about the lvm-devel
mailing list