coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

timeout: heads up: kFreeBSD's timers cause all timeout tests to hang


From: Jim Meyering
Subject: timeout: heads up: kFreeBSD's timers cause all timeout tests to hang
Date: Mon, 19 Sep 2011 13:48:27 +0200

While working around the getcwd limitation on kFreeBSD,
I noticed that all timeout-using tests were hanging.
HAVE_TIMER_SETTIME was defined, so I confirmed that
disabling that definition made it so all tests now pass:

diff --git a/src/timeout.c b/src/timeout.c
index d734e4e..c87d603 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -112,7 +112,7 @@ settimeout (double duration)
    deprecated by POSIX.  Instead we fallback to single second
    resolution provided by alarm().  */

-#if HAVE_TIMER_SETTIME
+#if 0
   struct timespec ts = dtotimespec (duration);
   struct itimerspec its = { {0, 0}, ts };
   timer_t timerid;

Obviously the above is just FYI.
The real change should probably be in configure-time code that tests
not just for existence, but also for working timer functions.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]