On Thu, Jul 26, 2012 at 02:48:51PM -0700, Ben Pfaff wrote:
> open() with O_CREAT|O_EXCL yields EEXIST if the file being opened is a
> symlink.  lockfile_try_lock() interpreted that error code to mean that
> some other process had created the lock file in the meantime, so it went
> around its loop again, which found out the same thing, which led to a hang.
> 
> This commit fixes the problem by dropping O_EXCL.  I don't see any reason
> that it's actually necessary.  That means that the loop itself is
> unnecessary, so this commit drops that too.

Acked-by: Simon Horman <ho...@verge.net.au>

> Debian bug #681880.
> CC: 681...@bugs.debian.org
> Reported-by: Bastian Blank <wa...@debian.org>
> Signed-off-by: Ben Pfaff <b...@nicira.com>
> ---
>  lib/lockfile.c        |   50 +++++++++++++++---------------------------------
>  tests/lockfile.at     |    1 +
>  tests/test-lockfile.c |   38 ++++++++++++++++++++++++++++++++++++-
>  3 files changed, 54 insertions(+), 35 deletions(-)


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to