HP3000-L Archives

November 1998, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael I Yawn <[log in to unmask]>
Reply To:
Michael I Yawn <[log in to unmask]>
Date:
Wed, 18 Nov 1998 15:29:17 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Mark,

Do you really need to know the signal, or do you just want to retry?
The code I use for a file open looks something like this:

        while(1) {
           newfd = open(fname, flags, mode);
           if ((newfd !=-1) || ((errno != EAGAIN) && (errno != EINTR)) {
              break;
           }
        }

        if (newfd == -1) ... /* we have a real error */



Mark Bixby ([log in to unmask]) wrote:
: I'm debugging an intermittent situation where the POSIX fopen() function
: is sometimes returning EINTR (interrupted system call due to signal receipt).

: This application makes heavy use of signals and has all sorts of signal
: handlers.

: How can I find out which signal is causing the EINTR?  I suppose I could
: modify all of the signal handlers to log debugging info as each signal is
: tripped.  But there are many signal handlers.

: Is there any way to determine outside of a signal handler what the last signal
: received was?
: --
: Mark Bixby                      E-mail: [log in to unmask]
: Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
: District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
: Technical Support               Voice: +1 714 438-4647
: "You can tune a file system, but you can't tune a fish." - tunefs(1M)


--
-----------------------------------------------------------------
Mike Yawn
Hewlett-Packard                      email       [log in to unmask]
Commercial Systems Division          Voice         (408) 447-4367
19447 Pruneridge Ave M/S 47UA        Fax           (408) 447-4441
Cupertino, CA  95014
-----------------------------------------------------------------

ATOM RSS1 RSS2