[lkml]   [2002]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: gettimeofday problem
    On Tue, 25 Jun 2002 21:45, Richard B. Johnson wrote:
    > On Tue, 25 Jun 2002, Brad Hards wrote:
    > > On Tue, 25 Jun 2002 10:37, Christian Robert wrote:
    > > > gettimeofday (&tv, NULL);
    > >
    > > How about checking the return value of the function call?
    > >
    > > Brad
    > > --
    > > 22-25Jan2003. Perth, Australia. Birds in Black.
    > I think the only possible error returned would relate to the time-zone
    > being invalid. The time-zone pointer being a NULL is valid so it isn't
    > going to return EINVAL.
    It was just a thought - it just seemed a reasonable thing to test for, since
    the call can fail.

    I didn't check the lib code, so I imagined that their might be some glibc
    munging of the syscall output. man gettimeofday sez, inter alia:
    EINVAL Timezone (or something else) is invalid.

    EFAULT One of tv or tz pointed outside your accessible
    address space.

    As you pointed out, EINVAL doesn't seem too likely, and I can't see a pointer
    problem. So it looks like something else.


    -- 22-25Jan2003. Perth, Australia. Birds in Black.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:27    [W:0.022 / U:76.944 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site