Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 25 Jun 2002 07:53:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 25 Jun 2002 07:53:07 -0400 Received: from mta06bw.bigpond.com ([139.134.6.96]:13530 "EHLO mta06bw.bigpond.com") by vger.kernel.org with ESMTP id ; Tue, 25 Jun 2002 07:53:06 -0400 From: Brad Hards To: root@chaos.analogic.com Subject: Re: gettimeofday problem Date: Tue, 25 Jun 2002 21:50:10 +1000 User-Agent: KMail/1.4.5 Cc: Christian Robert , linux-kernel@vger.kernel.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Content-Disposition: inline Message-Id: <200206252150.10271.bhards@bigpond.net.au> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1362 Lines: 36 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 > > -- > > http://conf.linux.org.au. 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. Brad -- http://conf.linux.org.au. 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/