Signal_receiver::wait_for_signal(): check for pending signal before blocking

Fixes #2267
This commit is contained in:
Christian Prochaska 2017-01-31 14:08:00 +01:00 committed by Norman Feske
parent 0f6800b20f
commit a1b4e905ab

View File

@ -120,12 +120,12 @@ Signal Signal_receiver::wait_for_signal()
{ {
for (;;) { for (;;) {
/* block until the receiver has received a signal */
block_for_signal();
try { try {
return pending_signal(); return pending_signal();
} catch (Signal_not_pending) { } } catch (Signal_not_pending) { }
/* block until the receiver has received a signal */
block_for_signal();
} }
} }