chiark / gitweb /
udevd: use ppoll instead of signal pipes
authorOlaf Kirch <okir@suse.de>
Tue, 20 Jan 2009 11:49:20 +0000 (12:49 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 20 Jan 2009 11:49:20 +0000 (12:49 +0100)
commit3210a72ba314dd15e6f7ed85ee22d7a5a0944b7a
treeb8b4f5eec27f6f02cec8a5444337604f1fcd0f45
parenta3ab20722d966ae33dbdb4f8fd6ead50b2472f7d
udevd: use ppoll instead of signal pipes

udevd uses a rather old-fashioned way of handling signals
while waiting for input through select (ie by using an unnamed
pipe, to which the signal handler writes one byte for every signal
received). This is rather awkward and may potentially even block
if we receive more signals than the kernel's pipe buffer.

This patch replaces all of that with ppoll, which was designed
for this purpose.

It also removes the SA_RESTART flag from all installed signal
handlers, because otherwise the ppoll call would just be restarted
after handling eg a SIGCHLD.

Signed-off-by: Olaf Kirch <okir@suse.de>
udev/udevd.c