NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
standards/44927: setitimer(2) may fail with EPERM
>Number: 44927
>Category: standards
>Synopsis: setitimer(2) may fail with EPERM
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: standards-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 02 16:35:00 +0000 2011
>Originator: Jukka Ruohonen
>Release: NetBSD 5.99.51
>Organization:
-
>Description:
The setitimer(2) syscall may fail with EPERM.
>How-To-Repeat:
The following code fails correctly with EFAULT on Linux, but NetBSD
fails with EPERM for some reason.
#include <sys/time.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
int
main(void)
{
int rv;
errno = 0;
rv = setitimer(ITIMER_REAL, (void*)-1, NULL);
(void)printf("rv = %d, errno = %s\n", rv, strerror(errno));
return 0;
}
>Fix:
Not investigated.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index