- case OK:
- /* child process -- send it */
- SIGNAL (SIGHUP, SIG_IGN);
- SIGNAL (SIGINT, SIG_IGN);
- SIGNAL (SIGQUIT, SIG_IGN);
- SIGNAL (SIGTERM, SIG_IGN);
- if (forwsw) {
- if ((in = open (file, O_RDONLY)) == NOTOK) {
- admonish (file, "unable to re-open");
- } else {
- lseek (out, (off_t) 0, SEEK_END);
- strncpy (buf, "\nMessage not delivered to anyone.\n", sizeof(buf));
- write (out, buf, strlen (buf));
- strncpy (buf, "\n------- Unsent Draft\n\n", sizeof(buf));
- write (out, buf, strlen (buf));
- cpydgst (in, out, file, "temporary file");
- close (in);
- strncpy (buf, "\n------- End of Unsent Draft\n", sizeof(buf));
- write (out, buf, strlen (buf));
- if (rename (file, strncpy (buf, m_backup (file), sizeof(buf))) == NOTOK)
- admonish (buf, "unable to rename %s to", file);
- }
+ case OK:
+ /* child process -- send it */
+ SIGNAL(SIGHUP, SIG_IGN);
+ SIGNAL(SIGINT, SIG_IGN);
+ SIGNAL(SIGQUIT, SIG_IGN);
+ SIGNAL(SIGTERM, SIG_IGN);
+ if (forwsw) {
+ if ((in = open(file, O_RDONLY)) == NOTOK) {
+ admonish(file, "unable to re-open");
+ } else {
+ lseek(out, (off_t) 0, SEEK_END);
+ strncpy(buf, "\nMessage not delivered to anyone.\n", sizeof(buf));
+ write(out, buf, strlen(buf));
+ strncpy(buf, "\n------- Unsent Draft\n\n", sizeof(buf));
+ write(out, buf, strlen(buf));
+ cpydgst(in, out, file, "temporary file");
+ close(in);
+ strncpy(buf, "\n------- End of Unsent Draft\n", sizeof(buf));
+ write(out, buf, strlen(buf));
+ if (rename(file, strncpy(buf, m_backup(file), sizeof(buf))) == NOTOK)
+ admonish(buf, "unable to rename %s to", file);