]> diplodocus.org Git - nmh/blobdiff - uip/rcvtty.c
Make sure to mark the sequence file as closed in the msgs struct.
[nmh] / uip / rcvtty.c
index 9cd77dd6e37bb37241efd38a8455d1f02fb660be..5443748c99b56674318ad67f5814e3d1630fc181 100644 (file)
@@ -192,7 +192,7 @@ message_fd (char **vec)
     fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)));
     unlink (tmpfil);
 
-    if ((child_id = vfork()) == NOTOK) {
+    if ((child_id = fork()) == NOTOK) {
        /* fork error */
        close (fd);
        return header_fd ();
@@ -257,6 +257,7 @@ header_fd (void)
     /* get new format string */
     nfs = new_fs (form, format, SCANFMT);
     scan (stdin, 0, 0, nfs, width, 0, 0, NULL, 0L, 0);
+    scan_finished ();
     if (newline)
         write (fd, "\n\r", 2);
     write (fd, scanl, strlen (scanl));