]> diplodocus.org Git - nmh/commitdiff
Restored the unlinks of temporary files immediately after their
authorDavid Levine <levinedl@acm.org>
Sat, 25 Jan 2014 15:26:13 +0000 (09:26 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 25 Jan 2014 15:26:13 +0000 (09:26 -0600)
creation in rcvtty.c, now that we have m_unlink().

uip/rcvtty.c

index bf140ddd0daf2b16d71ad35098ff6b7f99d2be40..8ddc15d1d66df489b790827c7c2b09fd75371f2c 100644 (file)
@@ -192,6 +192,7 @@ message_fd (char **vec)
        advise(NULL, "unable to create temporary file in %s", get_temp_dir());
        return NOTOK;
     }
+    m_unlink(tfile);  /* Use fd, no longer need the file name. */
 
     if ((child_id = fork()) == NOTOK) {
        /* fork error */
@@ -255,6 +256,7 @@ header_fd (void)
        advise(NULL, "unable to create temporary file in %s", get_temp_dir());
         return NOTOK;
     }
+    m_unlink(tfile);  /* Use fd, no longer need the file name. */
 
     rewind (stdin);