getitimer() in 1.7.10-1

Andrew Mangogna andrewM@incubelabs.com
Fri Feb 17 17:06:00 GMT 2012


After recently updating to 1.7.10-1 of the Cygwin library I have noticed that the invocation of "getitimer()" in my applications is now failing all the time. The following program shows the result:

#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <errno.h>

int
main(
    int arc,
    char **argv)
{
    struct itimerval timer ;

    int err = getitimer(ITIMER_REAL, &timer) ;
    if (err != 0) {
        printf("getitimer failed: %d, \"%s\"(%d)\n", err, strerror(errno),
            errno) ;
    }
}

When compiled with:

gcc -o gtmr -D_POSIX_C_SOURCE=200112L -std=c99 -g3 -Wall gtmr.c

Executing the result gives:
 
getitimer failed: -1, "No error"(0)

with various permutation of compiler flags not changing the result.

The same program on a colleague's box where 1.7.9 is installed runs without any output.

I'm curious if anyone else has seen a problem here. I suspect I'm doing something wrong, but this has been working for quite some time in the past and getitimer() is petty mundane stuff.

Andrew Mangogna


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list