From owner-freebsd-hackers Sun Jan 6 6:54: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from servidor1.cursosvirtuales.com.ar (www.cursosvirtuales.com.ar [200.10.104.198]) by hub.freebsd.org (Postfix) with ESMTP id C55DE37B416 for ; Sun, 6 Jan 2002 06:54:06 -0800 (PST) Received: (from fpscha@localhost) by servidor1.cursosvirtuales.com.ar (8.11.1/8.11.1) id g06Et3x71619; Sun, 6 Jan 2002 11:55:03 -0300 (ART) (envelope-from fpscha) From: "Fernando P. Schapachnik" Message-Id: <200201061455.g06Et3x71619@servidor1.cursosvirtuales.com.ar> Subject: Re: SA_NODEFER and signal nesting In-Reply-To: <3C376D8D.CBEA1BF@mindspring.com> "from Terry Lambert at Jan 5, 2002 01:18:05 pm" To: Terry Lambert Date: Sun, 6 Jan 2002 11:55:03 -0300 (ART) Cc: fernando@cursosvirtuales.com.ar, freebsd-hackers@freebsd.org X-From: Fernando Schapachnik Reply-To: fernando@cursosvirtuales.com.ar X-OS: FreeBSD 4.2 - http://www.freebsd.org X-Mailer: ELM [version 2.4ME+ PL87 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Terry Lambert wrote: > Yes. Signals are persistant conditions, not events. Aha... That explains it. > When you get the first SIGIO, set a flag (volatile) in the > signal handler. In your main loop, check for the flag, and > if it is present, use poll/select to verify that there is > data pending, and while there is data pending, retrieve it. I've recoded this way and it works. Not as clean as I would prefer (because my program is a distributed number cruncher and I'd tried to make a clean separation between main processing and net I/O), but works. Thanks for you help. Fernando P. Schapachnik fernando@cvi.com.ar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message