on_exit_set_custom_key_return_code() now flushes stdio, this fixes #197

This commit is contained in:
Scoopta 2023-03-02 23:12:34 -08:00
parent 51c517b79c
commit 866fd2af31

View File

@ -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);
}
}