From owner-freebsd-hackers Tue Dec 19 10:25:32 2000 From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 19 10:25:31 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id CAF4837B400 for ; Tue, 19 Dec 2000 10:25:29 -0800 (PST) Received: from lanczos.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 19 Dec 2000 18:25:28 +0000 (GMT) To: Daniel Eischen Cc: David Malone , Alfred Perlstein , Dmitry Dicky , freebsd-hackers@FreeBSD.ORG, dwmalone@maths.tcd.ie Subject: Re: recvfrom() and signals In-reply-to: Your message of "Tue, 19 Dec 2000 13:15:50 EST." X-Request-Do: Date: Tue, 19 Dec 2000 18:25:28 +0000 From: David Malone Message-ID: <200012191825.aa15924@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > He is setting the signal handler with signal(), which calls > > sigaction() without the SA_RESTART flag set, so it seems that should > > interrupt recvfrom(). > Bzzt :-) Alfred's correct. Read the manpage for signal again. Ahh - I was reading the source code and missed the ! in !sigismember(). I was thinking of people using alarm() to timeout recvfrom() using a sigsetjmp(), but you don't need the syscall to be interrupted for that. *less confused now* > To Dmitry: Don't use antiquated signal. Use sigaction and don't > set the SA_RESTART flag. Indeedy! David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message