From: Marcin Cieslak Date: Tue, 10 Feb 2015 14:18:05 +0000 (+0000) Subject: Fixed the error message in lockit() when it fails to create tmp file. X-Git-Tag: mmh-0.2-RC1~45 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=4e4c5eeaffc0ff9e341c1562a02c1749a9a06dbe;hp=24756fd85e33a76ac495073e90a7a56cb7f6103c Fixed the error message in lockit() when it fails to create tmp file. --- diff --git a/sbr/lock_file.c b/sbr/lock_file.c index d15c939..b1879b3 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -429,8 +429,10 @@ lockit(struct lockinfo *li) curlock = li->curlock; tmplock = li->tmplock; - if ((fd = mkstemp(tmplock)) == -1) + if ((fd = mkstemp(tmplock)) == -1) { + advise(NULL, "unable to create temporary file in %s", tmplock); return -1; + } #if 0 /* write our process id into lock file */