From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1893 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runsv and EAGAIN Date: Sat, 12 Jul 2008 18:07:16 +0200 Message-ID: <20080712160716.GA30532@fly.srk.fer.hr> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1215878846 25280 80.91.229.12 (12 Jul 2008 16:07:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jul 2008 16:07:26 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2128-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jul 12 18:08:13 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 1KHhdt-0003qL-PA for gcsg-supervision@gmane.org; Sat, 12 Jul 2008 18:08:13 +0200 Original-Received: (qmail 24080 invoked by uid 76); 12 Jul 2008 16:07:40 -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 24072 invoked from network); 12 Jul 2008 16:07:40 -0000 X-Virus-Scanned: Debian amavisd-new at fly.srk.fer.hr Mail-Followup-To: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= , supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: X-Face: 'UIE}WabGB0+U>p-#(hp<_+AD2{H],=qR*jHfm$/e]l0(kU3oOYc5lqG6gg>[\h^IOc{'siD6#!T&loIShgmYHz3#+*D38:|`~\BE,(W~Ol9BDfDwk'lKJ;Z{sY8E9(ME.E]'wvNO`$n#,;9Z`tOFcW/nHZq!BOSrM>V?C<5DTw=<${c{M2V+|)0jSUl&!+8%8nIBF(u:E>SZWM^e X-Attribution: Dave User-Agent: Mutt/1.5.13 (2006-08-11) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1893 Archived-At: 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 You only have POLLIN in revents for fd 9. Also, the return value is 1, meaning that only one file descriptor has readable data. > >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 > ... > So poll i saying that data is available, and read is saying that it isn't. > Is anyone else confused? poll() is saying that the data is available on fd 9 and read() on fd 9 does not return an error. The other two file descriptors should have not been read. -- .-. .-. Yes, I am an agent of Satan, but my duties are largely (_ \ / _) ceremonial. | | dave@fly.srk.fer.hr