From owner-freebsd-net Wed Apr 4 17:59:56 2001 Delivered-To: freebsd-net@freebsd.org Received: from molly.straylight.com (molly.straylight.com [209.68.199.242]) by hub.freebsd.org (Postfix) with ESMTP id 704E637B43F; Wed, 4 Apr 2001 17:59:51 -0700 (PDT) (envelope-from jonathan@graehl.org) Received: from dickie (case.straylight.com [209.68.199.244]) by molly.straylight.com (8.11.0/8.10.0) with SMTP id f350xig04593; Wed, 4 Apr 2001 17:59:44 -0700 From: "Jonathan Graehl" To: "Freebsd-Net" Cc: "Jonathan Lemon" Subject: please document that kevent does not automatically restart when interrupted by signals Date: Wed, 4 Apr 2001 17:59:53 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org It is my understanding that an unmasked signal will always interrupt a call to kevent, even if SA_RESTART is specified in sigaction, or siginterrupt(signo, 0) is used. Can this be officially documented so that it can be relied upon? I want signals to interrupt kevent; I would like to be able to use SA_RESTART so that I don't have to check for an EINTR except from kevent, but I wouldn't want kevent restarted for me should the implementation change out from under me. Other signal interrupt / restart questions: Can a signal ever interrupt a (nonblocking) datagram write/read (possibly truncating a datagram due to a partial read/write count)? (my guess: not unless you're sleeping awaiting a datagram with a blocking read) Is this behavior documented? Can a signal ever interrupt an I/O on a nonblocking fd, such that the I/O will return EINTR rather than EAGAIN or a partial success? (my guess: no, I don't need to check for EINTR for nonblocking fds even if I siginterrupt(signo, 1)) Is this documented? I currently use SA_RESTART, assume that EINTR will never be returned, except I expect EINTR to be returned immediately by kevent so I can get my signal and process it in a synchronous fashion outside of my event handling logic. Relying on undocumented behavior makes me nervous. Are there any other system calls I should worry about returning EINTR even when I specify SA_RESTART? Thanks, -- Jonathan Graehl http://jonathan.graehl.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message