X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=hooks.c;h=662629a951b309021cb86eebfbb0d0cca345e8d0;hp=44ee41980085c5383c8f9d617fa63764d410110f;hb=4e2c351c588ad74f4800ca0344232be90387c54a;hpb=d399b6b909fe6e2c6073464006061382c8bb31d5 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,