kscreenlocker_greet: use SA_RESTART for signal handler

As discussed in https://git.reviewboard.kde.org/r/117091/. Not using the
SA_RESTART flag might (in theory) cause the greeter to be aborted
(because certain syscalls may be interrupted and fail with EINTR).
SA_RESTART seems to be the BSD default and is used by "legacy" signal()
by default in glibc 2 and later as well anyway.

REVIEW: 118563
wilder-5.14
Wolfgang Bauer 12 years ago
parent efb17fe58c
commit 705ec385df
  1. 2
      ksmserver/screenlocker/greeter/main.cpp

@ -98,7 +98,7 @@ int main(int argc, char* argv[])
struct sigaction sa;
sa.sa_handler = signalHandler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_flags = SA_RESTART;
sigaction(SIGTERM, &sa, nullptr);
sigaction(SIGUSR1, &sa, nullptr);
return app.exec();

Loading…
Cancel
Save