Avoid double-close in unusual dotlock situations.
authorWerner Koch <wk@gnupg.org>
Thu, 12 Feb 2015 17:26:58 +0000 (18:26 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 12 Feb 2015 17:26:58 +0000 (18:26 +0100)
commitf256bab03e2f191bc2e97fd2cc579d82c440b996
tree6e6260892af87be10c3dcf7ca3be3b1e584f3152
parentb2359db21c1eca7441c63b0791f8e3405b42ff83
Avoid double-close in unusual dotlock situations.

* jnlib/dotlock.c (create_dotlock): Avoid double close due to EINTR.
--

close(2) says:

  close() should not be retried after an EINTR since this may cause a
  reused descriptor from another thread to be closed.

(backported from commit 628b111fa679612e23c0d46505b1ecbbf091897d)

Debian-Bug-Id: 773423
Signed-off-by: Werner Koch <wk@gnupg.org>
jnlib/dotlock.c