]> git.notmuchmail.org Git - notmuch/blobdiff - hooks.c
Merge branch 'release'
[notmuch] / hooks.c
diff --git a/hooks.c b/hooks.c
index 44ee41980085c5383c8f9d617fa63764d410110f..7348d322791f8eb23ec97e318f53123ba96d0084 100644 (file)
--- a/hooks.c
+++ b/hooks.c
@@ -15,7 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  *
  * Author: Jani Nikula <jani@nikula.org>
  */
@@ -50,6 +50,9 @@ notmuch_run_hook (const char *db_path, const char *hook)
        goto DONE;
     }
 
+    /* Flush any buffered output before forking. */
+    fflush (stdout);
+
     pid = fork();
     if (pid == -1) {
        fprintf (stderr, "Error: %s hook fork failed: %s\n", hook,