tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: alarm(3) bug?
On Tue, Oct 23, 2012 at 01:58:29PM -0700, enh wrote:
> i was trying to replace bionic's hacked alarm.c with the current
> NetBSD alarm.c, but noticed that you return -1 on error, unlike glibc
> and bionic, and apparently contrary to POSIX:
>
> http://pubs.opengroup.org/onlinepubs/009695399/functions/alarm.html
>
> "The alarm() function is always successful, and no return value is
> reserved to indicate an error."
I'd say you have a bigger problem if the system call fails.
The alternative would be silently ignoring the error, which doesn't feel
better.
Joerg
Home |
Main Index |
Thread Index |
Old Index