Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upUse pselect() in qrexec code #241
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Modified by joanna on 18 Jul 2011 22:03 UTC |
marmarek
self-assigned this
Mar 8, 2015
marmarek
added this to the Release 1 Beta 3 milestone
Mar 8, 2015
marmarek
added
bug
C: core
P: minor
labels
Mar 8, 2015
marmarek
modified the milestones:
Release 1 Beta 2,
Release 1 Beta 3
Mar 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
marmarek
Mar 8, 2015
Member
Comment by marmarek on 3 Sep 2011 14:53 UTC
http://git.qubes-os.org/gitweb/?p=marmarek/core.git;a=commit;h=e2aeceb2303c036eeef760fa1460ca459de59f9d
|
Comment by marmarek on 3 Sep 2011 14:53 UTC |
marmarek
closed this
Mar 8, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
marmarek commentedMar 8, 2015
Reported by rafal on 9 Jun 2011 09:47 UTC
qrexec_agent and qrexec_daemon should use pselect(), not select(), in order to not delay child exit handling (not react to "child_exited" variable being set).
See the man page for "select" for the difference between select and pselect. Indeed, qrexec_agent should react to SIGCHLD and fd activity. If SIGCHLD arrives after "if child_exited" test, but before select(), we may not break out of select until there is some fd activity.
I have not seen this race ever, and it seems unlikely, but it should be fixed.
In case other more important issues preempt this, at least add "if child_exited" test just before select(), to make race more unlikely.
Migrated-From: https://wiki.qubes-os.org/ticket/241