supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Dražen Kačar" <dave@fly.srk.fer.hr>
To: supervision@list.skarnet.org
Subject: Re: runsv and EAGAIN
Date: Sat, 12 Jul 2008 18:07:16 +0200	[thread overview]
Message-ID: <20080712160716.GA30532@fly.srk.fer.hr> (raw)
In-Reply-To: <Pine.LNX.4.64.0807112122240.21979@e-smith.charlieb.ott.istop.com>

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


  reply	other threads:[~2008-07-12 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 20:46 Charlie Brady
2008-07-12  1:27 ` Charlie Brady
2008-07-12 16:07   ` Dražen Kačar [this message]
2008-07-13  2:46     ` Charlie Brady
2009-01-20 23:21       ` runsv spinning 100% CPU (was Re: runsv and EAGAIN) Charlie Brady
2009-02-10 12:41         ` Gerrit Pape
2009-02-18  0:09           ` Laurent Bercot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080712160716.GA30532@fly.srk.fer.hr \
    --to=dave@fly.srk.fer.hr \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).