Merge lp:~muktupavels/lightdm/retry-interrupted-read into lp:lightdm

Proposed by Alberts Muktupāvels
Status: Merged
Merged at revision: 2445
Proposed branch: lp:~muktupavels/lightdm/retry-interrupted-read
Merge into: lp:lightdm
Diff against target: 12 lines (+1/-1)
1 file modified
src/process.c (+1/-1)
To merge this branch: bzr merge lp:~muktupavels/lightdm/retry-interrupted-read
Reviewer Review Type Date Requested Status
LightDM Development Team Pending
Review via email: mp+312845@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

That seems weird -- if lightdm installs signal handlers it really should use SA_RESTART -- fixing each and every I/O operation to retry on EINTR is a game of whack-a-rat.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Then correct fix would be to use 'action.sa_flags = SA_SIGINFO | SA_RESTART' in src/process.c?

2446. By Alberts Muktupāvels

Use SA_RESTART flag.

Revision history for this message
Iain Lane (laney) wrote :

I would say that it is, assuming

 - that it fixes the bug
 - that it wasn't left out on purpose

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/process.c'
2--- src/process.c 2016-10-19 12:24:49 +0000
3+++ src/process.c 2016-12-08 21:32:41 +0000
4@@ -458,7 +458,7 @@
5 g_io_add_watch (g_io_channel_unix_new (signal_pipe[0]), G_IO_IN, handle_signal, NULL);
6 action.sa_sigaction = signal_cb;
7 sigemptyset (&action.sa_mask);
8- action.sa_flags = SA_SIGINFO;
9+ action.sa_flags = SA_SIGINFO | SA_RESTART;
10 sigaction (SIGTERM, &action, NULL);
11 sigaction (SIGINT, &action, NULL);
12 sigaction (SIGHUP, &action, NULL);

Subscribers

People subscribed via source and target branches