X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/364c38d3af67e2b56a90a6547ec9f773967bf1df..4984edc7c449d68ad08785bbdc6a01675aeca6e7:/lib-src/movemail.c diff --git a/lib-src/movemail.c b/lib-src/movemail.c index f82bebd4f2..1f73ee88ba 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -1,6 +1,7 @@ /* movemail foo bar -- move file foo to file bar, locking file foo the way /bin/mail respects. - Copyright (C) 1986, 92, 93, 94, 96, 1999 Free Software Foundation, Inc. + Copyright (C) 1986, 1992, 1993, 1994, 1996, 1999, 2002, 2003, 2004, + 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -465,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;