]> code.delx.au - gnu-emacs/blobdiff - lib-src/movemail.c
Formatting fixes.
[gnu-emacs] / lib-src / movemail.c
index e8f1122e94319ad0849460ab0ce1de80fe1e693e..1f73ee88ba88a38c6492e42584934686eec1a983 100644 (file)
@@ -1,7 +1,7 @@
 /* movemail foo bar -- move file foo to file bar,
    locking file foo the way /bin/mail respects.
    Copyright (C) 1986, 1992, 1993, 1994, 1996, 1999, 2002, 2003, 2004,
-                 2005 Free Software Foundation, Inc.
+                 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -466,6 +466,8 @@ main (argc, argv)
        while (1)
          {
            nread = read (indesc, buf, sizeof buf);
+           if (nread < 0)
+             pfatal_with_name (inname);
            if (nread != write (outdesc, buf, nread))
              {
                int saved_errno = errno;