DevHeads.net

Review Request 118563: kscreenlocker_greet: use SA_RESTART for signal handler

Review request for kde-workspace.

Repository: kde-workspace

Description
As discussed in <a href="https://git.reviewboard.kde.org/r/117091/" title="https://git.reviewboard.kde.org/r/117091/">https://git.reviewboard.kde.org/r/117091/</a>. 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.

Diffs
ksmserver/screenlocker/greeter/main.cpp 4cac94c

Diff: <a href="https://git.reviewboard.kde.org/r/118563/diff/" title="https://git.reviewboard.kde.org/r/118563/diff/">https://git.reviewboard.kde.org/r/118563/diff/</a>

Testing
I'm using this myself for one month without any problems.

Thanks,

Wolfgang Bauer

Comments

Re: Review Request 118563: kscreenlocker_greet: use SA_RESTART f

By Wolfgang Bauer at 06/05/2014 - 12:20

(Updated June 5, 2014, 4:20 p.m.)

Status
This change has been marked as submitted.

Review request for kde-workspace.

Repository: kde-workspace

Description
As discussed in <a href="https://git.reviewboard.kde.org/r/117091/" title="https://git.reviewboard.kde.org/r/117091/">https://git.reviewboard.kde.org/r/117091/</a>. 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.

Diffs
ksmserver/screenlocker/greeter/main.cpp 4cac94c

Diff: <a href="https://git.reviewboard.kde.org/r/118563/diff/" title="https://git.reviewboard.kde.org/r/118563/diff/">https://git.reviewboard.kde.org/r/118563/diff/</a>

Testing
I'm using this myself for one month without any problems.

Thanks,

Wolfgang Bauer

Re: Review Request 118563: kscreenlocker_greet: use SA_RESTART f

By Commit Hook at 06/05/2014 - 12:28

This review has been submitted with commit 705ec385df2b6fc0c81b046f4323fbd61baadd26 by Wolfgang Bauer to branch master.

- Commit Hook

On June 5, 2014, 4:20 p.m., Wolfgang Bauer wrote:

Re: Review Request 118563: kscreenlocker_greet: use SA_RESTART f

By Commit Hook at 06/05/2014 - 12:19

This review has been submitted with commit 97bd72668224c1548d530f7967f77482d4c69630 by Wolfgang Bauer to branch KDE/4.11.

- Commit Hook

On June 5, 2014, 1:16 p.m., Wolfgang Bauer wrote:

Re: Review Request 118563: kscreenlocker_greet: use SA_RESTART f

By Martin =?ISO-88... at 06/05/2014 - 09:32

Ship it!

the master (plasma-workspace repo) has a unit test for the signals. But I'm not sure whether we can extend it to catch this condition (we don't have a BSD CI system yet).

- Martin Gräßlin

On June 5, 2014, 3:16 p.m., Wolfgang Bauer wrote: