]> git.ipfire.org Git - thirdparty/gcc.git/commit
modula-2: Amend the handling of failed select() calls in RTint [PR108835].
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 25 Feb 2023 23:18:13 +0000 (23:18 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 30 Jun 2023 14:15:35 +0000 (15:15 +0100)
commitef4ea6e08707d27674a8c5ddb4b478aac8713c03
treec30fd8c7ec64f33f3ae9b6c644b68ebc4fc3e9b6
parentd6a6a4ea086d6af97bd7fbd482f51df41c265b79
modula-2: Amend the handling of failed select() calls in RTint [PR108835].

When we make a select() that fails, there is an attempt to (a) diagnose
why and (b) make a fallback.  These actions are causing some tests to
hang on some Darwin versions, this is because the first action that is
tried to assist in diagnosis/fallback handling is to replace the set
timeout with NIL (which causes select to wait forever, modulo other
reasons it might complete).

To fix this, call select with a zero timeout when checking for error
conditions.  Also, as we check the possible failure conditions, if we
find a change that succeeds, then stop looking for errors.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/108835

gcc/m2/ChangeLog:

* gm2-libs/RTint.mod: Do not use NIL timeout setting on select,
test failures sequentially, finishing on the first success.
gcc/m2/gm2-libs/RTint.mod