From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1767541AbXCIVdz (ORCPT ); Fri, 9 Mar 2007 16:33:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1767547AbXCIVdz (ORCPT ); Fri, 9 Mar 2007 16:33:55 -0500 Received: from x35.xmailserver.org ([64.71.152.41]:44180 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1767541AbXCIVdx (ORCPT ); Fri, 9 Mar 2007 16:33:53 -0500 X-AuthUser: davidel@xmailserver.org Date: Fri, 9 Mar 2007 13:33:42 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@alien.or.mcafeemobile.com To: "David M. Lloyd" cc: Linux Kernel Mailing List , Andrew Morton , Linus Torvalds Subject: Re: [patch 2/5] signalfd v2 - signalfd core ... In-Reply-To: <1173364264.6891.3.camel@localhost> Message-ID: References: <1173364264.6891.3.camel@localhost> X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Mar 2007, David M. Lloyd wrote: > On Wed, 2007-03-07 at 17:21 -0800, Davide Libenzi wrote: > > int signalfd_dequeue(int fd, siginfo_t *info, long timeo); > > > > The "fd" parameter must ba a signalfd file descriptor. The "info" parameter > > is a pointer to the siginfo that will receive the dequeued signal, and > > "timeo" is a timeout in milliseconds, or -1 for infinite. > > The signalfd_dequeue function returns 0 if successfull. > > Does this support non-blocking mode? It doesn't seem to at my level of > understanding anyway. If I use this with EPOLLET for example, I'd > expect to get a single EPOLLIN when a signal arrives, which would > indicate to me that I must call signalfd_dequeue() in a loop until I get > EAGAIN in order to be sure I've consumed all the outstanding signals so > that the edge-triggered notification can be "re-armed". > > Make sense? Yes, the new version can use the O_NONBLOCK flag and read(2) will return EAGAIN. Will post a newer version later, together with timerfd ... - Davide