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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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