(main): Fatal if hard links cannot be created.
authorChong Yidong <cyd@stupidchicken.com>
Thu, 1 Jan 2009 09:34:28 +0000 (09:34 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 1 Jan 2009 09:34:28 +0000 (09:34 +0000)
lib-src/movemail.c

index 7f9026d..eeb253a 100644 (file)
@@ -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;