From: Jon Steinhart Date: Tue, 12 Oct 2004 20:40:25 +0000 (+0000) Subject: Fixed strange bug that prevented a lock from ever being obtained if getting X-Git-Tag: RELEASE_1_2~62 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3162c1b16d85ce6590bb839fd25378a28c005afc;p=mmh Fixed strange bug that prevented a lock from ever being obtained if getting it failed the first time. The problem was that the string of XXXXXX that is required by mkstemp() was overwritten the first time through, and so all subsequent times failed because mkstemp() failed. The fix reinitializes the tmp file string. --- diff --git a/sbr/lock_file.c b/sbr/lock_file.c index 6deddd4..cda66ab 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -401,6 +401,7 @@ lkopen_dot (char *file, int access, mode_t mode) else sleep (5); } + lockname (file, &lkinfo, 1); } } #else