diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-20 21:15:15 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-20 21:15:15 +0100 |
commit | 4d67af399dee3319d10cfd3db29d440383c37d72 (patch) | |
tree | 6e31ae50813a7b83463a69bb2f24ffa83a85908f /src/core | |
parent | 7cd566e8d37fc06f8aef68e0e6a81d60df1dbc76 (diff) | |
download | weechat-4d67af399dee3319d10cfd3db29d440383c37d72.zip |
core: flush stdout/stderr before forking in hook_process function (closes #1441)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hook/wee-hook-process.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hook/wee-hook-process.c b/src/core/hook/wee-hook-process.c index be9060b96..d17a8867c 100644 --- a/src/core/hook/wee-hook-process.c +++ b/src/core/hook/wee-hook-process.c @@ -655,6 +655,10 @@ hook_process_run (struct t_hook *hook_process) HOOK_PROCESS(hook_process, child_write[i]) = pipes[i][1]; } + /* flush stdout and stderr before forking */ + fflush (stdout); + fflush (stderr); + /* fork */ switch (pid = fork ()) { |