From owner-freebsd-questions Mon Oct 12 13:36:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA04923 for freebsd-questions-outgoing; Mon, 12 Oct 1998 13:36:04 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA04846 for ; Mon, 12 Oct 1998 13:35:53 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.8/8.8.8) with ESMTP id NAA19641; Mon, 12 Oct 1998 13:35:07 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Mon, 12 Oct 1998 13:35:06 -0700 (PDT) From: Doug White To: Geoffrey Robinson cc: questions@FreeBSD.ORG Subject: Re: Interrupted System Calls Infinite Loop In-Reply-To: <36211E00.DDFD2346@globalserve.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 11 Oct 1998, Geoffrey Robinson wrote: > A friend of mine is working on a CGI that runs as many as 6 times a second > and reads and writes to several files each time it runs. One file in > particular that is opened with fopen() as read only is failing with errno > EINTR. I looked up interrupted system calls in _Advanced Programming in the > UNIX Environment_ by W. Richard Stevens who suggest handling the error by > simply retrying the system call repeatedly until it succeeds. I'd be intrigued to know why the syscall is being interrupted. The underlying open() is dying. Are you using any wacky open flags? Doug White Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve http://gladstone.uoregon.edu/~dwhite | www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message