From: Charlie Brady <charlieb-supervision@budge.apana.org.au>
To: supervision@list.skarnet.org
Subject: Re: runsv and EAGAIN
Date: Fri, 11 Jul 2008 21:27:56 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0807112122240.21979@e-smith.charlieb.ott.istop.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0807111638180.21272@e-smith.charlieb.ott.istop.com>
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?
next prev parent reply other threads:[~2008-07-12 1:27 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 [this message]
2008-07-12 16:07 ` Dražen Kačar
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=Pine.LNX.4.64.0807112122240.21979@e-smith.charlieb.ott.istop.com \
--to=charlieb-supervision@budge.apana.org.au \
--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).