aboutsummaryrefslogtreecommitdiffhomepage
path: root/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'hooks.c')
-rw-r--r--hooks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hooks.c b/hooks.c
index 44ee4198..662629a9 100644
--- a/hooks.c
+++ b/hooks.c
@@ -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,