]> diplodocus.org Git - nmh/blobdiff - sbr/folder_delmsgs.c
Beginning of work to run mhbuild always. A bit more complicated than I
[nmh] / sbr / folder_delmsgs.c
index 671ecc7cc5bc1a473cd40489b7335fad702071bb..ee4bd9e95e4b96d33b971578eda3918dd80363a3 100644 (file)
@@ -40,6 +40,14 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
        /* Mark that the sequence information has changed */
        mp->msgflags |= SEQMOD;
 
+       /*
+        * Write out the sequence and context files; this will release
+        * any locks before the rmmproc is called.
+        */
+
+       seq_save (mp);
+       context_save ();
+
        vec = argsplit(rmmproc, &prog, &vecp);
 
        /*
@@ -61,7 +69,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
 
        fflush (stdout);
 
-       switch (pid = vfork()) {
+       switch (pid = fork()) {
        case -1:
            advise ("fork", "unable to");
            return -1;
@@ -132,5 +140,12 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
     /* Mark that the sequence information has changed */
     mp->msgflags |= SEQMOD;
 
+    /*
+     * Write out sequence and context files
+     */
+
+    seq_save (mp);
+    context_save ();
+
     return retval;
 }