X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6bc64765f773ce75454ec1592a86779e3547fe46..337b4e616e8f53ba06285b1645e1df9918ed5c16:/uip/sendsbr.c diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 020949d0..af9412df 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -498,13 +498,19 @@ alert (char *file, int out) } else { lseek (out, (off_t) 0, SEEK_END); strncpy (buf, "\nMessage not delivered to anyone.\n", sizeof(buf)); - write (out, buf, strlen (buf)); + if (write (out, buf, strlen (buf)) < 0) { + advise (file, "write"); + } strncpy (buf, "\n------- Unsent Draft\n\n", sizeof(buf)); - write (out, buf, strlen (buf)); + if (write (out, buf, strlen (buf)) < 0) { + advise (file, "write"); + } cpydgst (in, out, file, "temporary file"); close (in); strncpy (buf, "\n------- End of Unsent Draft\n", sizeof(buf)); - write (out, buf, strlen (buf)); + if (write (out, buf, strlen (buf)) < 0) { + advise (file, "write"); + } if (rename (file, strncpy (buf, m_backup (file), sizeof(buf))) == NOTOK) admonish (buf, "unable to rename %s to", file); } @@ -597,7 +603,9 @@ anno (int fd, struct stat *st) /* reset the signal mask */ sigprocmask (SIG_SETMASK, &oset, &set); - chdir (cwd); + if (chdir (cwd) < 0) { + advise (cwd, "chdir"); + } break; default: /* no waiting... */