Switch to upstream alarm(3).
The only way the setitimer call can fail is if the unsigned number of seconds is too large to fit in the kernel's signed number of seconds. If you schedule a 68-year alarm, glibc will fail by returning 0 and BSD will fail by returning -1. Change-Id: Ic3721b01428f5402d99f31fd7f2ba2cc58805607
This commit is contained in:
@@ -112,3 +112,7 @@ TEST(unistd, read_EBADF) {
|
||||
ASSERT_EQ(-1, read(-1, buf, sizeof(buf)));
|
||||
ASSERT_EQ(EBADF, errno);
|
||||
}
|
||||
|
||||
TEST(unistd, alarm) {
|
||||
ASSERT_EQ(0U, alarm(0));
|
||||
}
|
||||
|
Reference in New Issue
Block a user