Ok to send a message with no subject and no body
[unix-history] / usr / src / usr.bin / mail / edit.c
index 6d1d9a0..1971329 100644 (file)
@@ -10,7 +10,7 @@
  * Perform message editing functions.
  */
 
  * Perform message editing functions.
  */
 
-static char *SccsId = "@(#)edit.c      1.3 %G%";
+static char *SccsId = "@(#)edit.c      2.4 %G%";
 
 /*
  * Edit a message list.
 
 /*
  * Edit a message list.
@@ -53,7 +53,7 @@ edit1(msgvec, ed)
        register char *cp, *cp2;
        register int c;
        int *ip, pid, mesg, lines;
        register char *cp, *cp2;
        register int c;
        int *ip, pid, mesg, lines;
-       unsigned int ms;
+       long ms;
        int (*sigint)(), (*sigquit)();
        FILE *ibuf, *obuf;
        char edname[15], nbuf[10];
        int (*sigint)(), (*sigquit)();
        FILE *ibuf, *obuf;
        char edname[15], nbuf[10];
@@ -108,7 +108,7 @@ edit1(msgvec, ed)
                        perror(edname);
                        goto out;
                }
                        perror(edname);
                        goto out;
                }
-               if (send(mp, obuf) < 0) {
+               if (send(mp, obuf, 0) < 0) {
                        perror(edname);
                        fclose(obuf);
                        remove(edname);
                        perror(edname);
                        fclose(obuf);
                        remove(edname);
@@ -144,6 +144,7 @@ edit1(msgvec, ed)
                        goto out;
                }
                if (pid == 0) {
                        goto out;
                }
                if (pid == 0) {
+                       sigchild();
                        if (sigint != SIG_IGN)
                                sigsys(SIGINT, SIG_DFL);
                        if (sigquit != SIG_IGN)
                        if (sigint != SIG_IGN)
                                sigsys(SIGINT, SIG_DFL);
                        if (sigquit != SIG_IGN)
@@ -188,7 +189,7 @@ edit1(msgvec, ed)
                size = fsize(otf);
                mp->m_block = blockof(size);
                mp->m_offset = offsetof(size);
                size = fsize(otf);
                mp->m_block = blockof(size);
                mp->m_offset = offsetof(size);
-               ms = 0;
+               ms = 0L;
                lines = 0;
                while ((c = getc(ibuf)) != EOF) {
                        if (c == '\n')
                lines = 0;
                while ((c = getc(ibuf)) != EOF) {
                        if (c == '\n')