X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f1722de88a9d80bc4aa8e787eee942a1c3fbb702..521674623:/sbr/folder_delmsgs.c?ds=sidebyside diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c index 671ecc7c..ee4bd9e9 100644 --- a/sbr/folder_delmsgs.c +++ b/sbr/folder_delmsgs.c @@ -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; }