From cccb6d4e87053ed63c74aee063fa84eb63ebf7b8 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 23 Nov 2017 11:20:53 +0100 Subject: sigwait: Do not fail with EINTR and return error code [BZ #22478] Since commit 8b0e795aaa445e9167aa07b282c5720b35342c07 Author: Adhemerval Zanella Date: Wed Nov 1 11:49:05 2017 -0200 Simplify Linux sig{timed}wait{info} implementations sigwait can fail with EINTR. Applications do not expect that, and the error code is not documented in POSIX or the manual pages. This commit restores the previous behavior by retrying the system call on EINTR. It also returns the error code, not -1, on the remaing errors. Reviewed-by: Adhemerval Zanella --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 04fac09f2d..18b2aa9561 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-11-23 Florian Weimer + + [BZ #22478] + * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Retry on EINTR. + Return error code, not -1. + * signal/tst-sigwait-eintr.c: New file. + * signal/Makefile (tests): Add tst-sigwait-eintr. + 2017-11-23 Florian Weimer Linux: Add memfd_create system call wrapper -- cgit v1.2.3