From 866fd2af310a6c724588d42d488373d482939785 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Thu, 2 Mar 2023 23:12:34 -0800 Subject: [PATCH] on_exit_set_custom_key_return_code() now flushes stdio, this fixes #197 --- src/wofi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index b5e000b..fd38261 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Scoopta + * Copyright (C) 2019-2023 Scoopta * This file is part of Wofi * Wofi is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1230,6 +1230,8 @@ static void do_copy(void) { static void on_exit_set_custom_key_return_code(int status, void* data) { _UNUSED(data); if (status == EXIT_SUCCESS) { + fflush(stdout); + fflush(stderr); _exit(custom_key_return_code); } }