X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/d399b6b909fe6e2c6073464006061382c8bb31d5..2f2df00d436b117acd3e0de13548406efaf272b8:/hooks.c diff --git a/hooks.c b/hooks.c index 44ee4198..7348d322 100644 --- 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 */ @@ -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,