Fix bug with std::raise(0) (#124)

A bug has been introduced in:
478d7e8bca

I purposefully allowed raising the signal zero, because I thought this
was doing nothing. See the response:
https://stackoverflow.com/a/32260528/5112390

but this is different on Windows.

See:
https://github.com/ArthurSonzogni/FTXUI/issues/117
This commit is contained in:
Arthur Sonzogni
2021-06-22 09:43:15 +02:00
committed by GitHub
parent 20a05e99ca
commit ba5826eab7

View File

@@ -205,7 +205,8 @@ void OnExit(int signal) {
on_exit_functions.top()();
on_exit_functions.pop();
}
std::raise(signal);
if (signal)
std::raise(signal);
}
auto install_signal_handler = [](int sig, SignalHandler handler) {