From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1892 Path: news.gmane.org!not-for-mail From: Charlie Brady Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runsv and EAGAIN Date: Fri, 11 Jul 2008 21:27:56 -0400 (EDT) Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1215826089 30249 80.91.229.12 (12 Jul 2008 01:28:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jul 2008 01:28:09 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2127-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jul 12 03:28:56 2008 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1KHTuy-0005jK-7T for gcsg-supervision@gmane.org; Sat, 12 Jul 2008 03:28:56 +0200 Original-Received: (qmail 30889 invoked by uid 76); 12 Jul 2008 01:28:21 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 30877 invoked from network); 12 Jul 2008 01:28:20 -0000 X-X-Sender: charlieb@e-smith.charlieb.ott.istop.com In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1892 Archived-At: On Fri, 11 Jul 2008, Charlie Brady wrote: > Here's a sample strace: > > rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0 > rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0 > poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN, revents=POLLIN}, {fd=11, > events=POLLIN}], 3, 1000020) = 1 > rt_sigprocmask(SIG_BLOCK, [TERM], NULL, 8) = 0 > rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0 > read(3, 0xbfa256c3, 1) = -1 EAGAIN (Resource temporarily > unavailable) > waitpid(-1, 0xbfa256bc, WNOHANG) = 0 > read(9, "", 1) = 0 > read(11, 0xbfa256c3, 1) = -1 EAGAIN (Resource temporarily > unavailable) > gettimeofday({1215792640, 591768}, NULL) = 0 ... > ... > ERRORS > The poll() function shall fail if: > > EAGAIN The allocation of internal data structures failed but a > subsequent request may succeed. > > ... Sorry - this, from "man 3 read" is the relevant manpage section: ... ERRORS EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and no data was immediately available for reading. ... So poll i saying that data is available, and read is saying that it isn't. Is anyone else confused?