This commit is contained in:
snek
2022-07-24 18:16:02 -07:00
committed by GitHub
parent 4cbc89f043
commit c6fa2b3fb4

View File

@@ -1368,14 +1368,14 @@ void GMainWindow::HandleSigInterrupt(int sig) {
// Calling into Qt directly from a signal handler is not safe,
// so wake up a QSocketNotifier with this hacky write call instead.
char a = 1;
write(sig_interrupt_fds[0], &a, sizeof(a));
(void) write(sig_interrupt_fds[0], &a, sizeof(a));
}
void GMainWindow::OnSigInterruptNotifierActivated() {
sig_interrupt_notifier->setEnabled(false);
char a;
read(sig_interrupt_fds[1], &a, sizeof(a));
(void) read(sig_interrupt_fds[1], &a, sizeof(a));
sig_interrupt_notifier->setEnabled(true);