[CCing bug-gnulib. This is the history of the thread: <https://lists.gnu.org/archive/html/bug-gettext/2013-11/msg00009.html> <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00134.html>]
Mikko Rantalainen wrote: > >> checking for working sleep... > >> > >> and just sits there, interminably. Ctrl-C breaks out without issue. > > > > It is executing the configure test from gnulib/m4/sleep.m4, which just > > exercises a bit of waiting and signal handling (fully POSIX compliant). > > Checking the source of sleep.m4 (assuming I found the correct one) shows > > > signal (SIGALRM, handle_alarm); > > alarm (1); > > remaining = sleep (pentecost); > > If system is under very high load it might take more than 1 second of > wall clock time to get from alarm() to sleep() and this test will then > hang for 50 days. Indeed, you're right: the m4/sleep.m4 test may hang, as you say. > I guess a correct way to fix this is to introduce a > new flag to tell if test is complete and if alarm is triggered before > the test is complete, re-arm the alarm 1 second later. This might work. Would you like to propose a patch? Thanks! Bruno