Hello list,

Lately I am testing and enhancing Gnulib on a relatively exotic
POSIX platform.

This platform lacks nanosleep(), and so uses the implementation
starting at lib/nanosleep.c:227 (Git master). Investigating a failure
in test-nanosleep, I found that the following assertion...

    ASSERT (nanosleep (&ts, &ts) == -1);

...tripped because the function returned 0, despite having been
interrupted by a SIGALRM. This appeared to occur not because of a
platform issue, but due to the implementation itself. I was able to
reproduce this failure on Linux after forcing Gnulib to use that same
implementation.

In nanosleep.c, the sighandler() function is never called (is the
program supposed to receive SIGCONT when some other signal interrupts
select()?), and even if it did, the nanosleep() implementation would
then return 1 instead of the correct value of -1.


Please Cc: any replies to me, as I am not subscribed to this list.


--Daniel


-- 
Daniel Richard G. || [email protected]
My ASCII-art .sig got a bad case of Times New Roman.

Reply via email to