From 097e9c90ee05614467d54f06dc6f8910c160d575 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 1 Jan 2009 09:34:28 +0000 Subject: [PATCH] (main): Fatal if hard links cannot be created. --- lib-src/movemail.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 7f9026d89c7..eeb253a585e 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -341,6 +341,13 @@ main (argc, argv) close (desc); tem = link (tempname, lockname); + +#ifdef EPERM + if (tem < 0 && errno == EPERM) + fatal ("Unable to create hard link between %s and %s", + tempname, lockname); +#endif + unlink (tempname); if (tem >= 0) break; -- 2.39.2