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

Re: FW: Bug#641832: bizarre behavior of setitimer on kfbsd



If any debian-bsd people could add some insight to this one, it would be
appreciated.

I've tried various test values, and it doesn't require the time be exactly MAX_INT to fail (smaller values fail also).

Please which one ?
The 49711 days really overflows.

The prior version of timeout didn't use setitimer, and one fix would be
to ignore that function when building on kFreeBSD, but that would mean
the program would have different features depending on which Debian
platform it's running on.

There are three variants of "timers".

- alarm - used in coreutils 8.5
- setitimer/getitimer
- timer_create/timer_settime - used in coreutils 8.13

alarm        - only sends SIGALRM, single second resolution
setitimer    - only sends SIGALRM, microsecond resolution
timer_create - can even start a thread, nanosecond resolution

IMHO, for mean time, the best way should be to use setitimer under kFreeBSD, the timer_create is implemented (may be even buggy) in userspace and in fact its real precision is lower compared to setitimer syscall.

Would be a setitimer patch acceptable for you ?

Petr


Reply to: