diff lib-src/movemail.c @ 100823:d893844c75a7

(main): Fatal if hard links cannot be created.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 01 Jan 2009 09:34:28 +0000
parents 3bea8ede5bd0
children a9f7e446141d
line wrap: on
line diff
--- a/lib-src/movemail.c	Thu Jan 01 09:34:15 2009 +0000
+++ b/lib-src/movemail.c	Thu Jan 01 09:34:28 2009 +0000
@@ -341,6 +341,13 @@
 	  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;