From: Blaisorblade <blaisorblade@yahoo.it>
To: Werner Almesberger <wa@almesberger.net>
Cc: user-mode-linux-devel@lists.sourceforge.net,
Jeff Dike <jdike@addtoit.com>, Rob Landley <rob@landley.net>
Subject: Re: [uml-devel] Occasional hang starting up.
Date: Fri, 17 Mar 2006 23:14:46 +0100 [thread overview]
Message-ID: <200603172314.47124.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20060317182722.B8529@almesberger.net>
On Friday 17 March 2006 22:27, Werner Almesberger wrote:
> Blaisorblade wrote:
> > 1) I'll try to fix poll(2) to return -EINVAL. Dunno whether anyone will
> > say "no, the app is stupid, it deserves no error", but hope not (with
> > "try" I refer to this). Attached patch should do this.
>
> I think the behaviour of "poll" with nfds = 0 is correct as it is.
> At least POSIX doesn't say anything to the extent that "nfds"
> couldn't be zero:
> http://www.opengroup.org/onlinepubs/009695399/functions/poll.html
I don't think that "hanging" is a correct behaviour anyway... unless the
application *wanted* to wait for a signal, but this is a clumsy way to do
this (I don't think there's any difference from pause()).
> Furthermore, this is one of several ways to implement a "sleep"
> function with sub-second granularity
> , so existing applications
> may already depend on "poll" accepting nfds = 0. (Of course,
> they would probably be better off using "nanosleep".)
This is a very smart note, however usleep(3) exists since 4.3 BSD so this is a
bit unlikely; however you're surely right on this.
> > 2) write_sigio_thread should do a "down" on a semaphore/mutex and the
> > first update_thread should "up" it.
>
> Yup :-)
>
> Thanks,
> - Werner
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2006-03-17 22:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-11 18:01 [uml-devel] Occasional hang starting up Rob Landley
2006-03-12 20:33 ` Blaisorblade
2006-03-14 20:22 ` Jeff Dike
2006-03-14 21:31 ` Rob Landley
2006-03-16 14:22 ` Werner Almesberger
2006-03-17 19:36 ` Blaisorblade
2006-03-17 21:27 ` Werner Almesberger
2006-03-17 22:14 ` Blaisorblade [this message]
2006-03-17 23:54 ` Werner Almesberger
2006-03-20 10:20 ` Werner Almesberger
2006-03-21 1:00 ` Jeff Dike
2006-03-21 1:21 ` Blaisorblade
2006-03-23 18:45 ` Jeff Dike
2006-03-23 19:05 ` Werner Almesberger
2006-03-23 20:13 ` Jeff Dike
2006-03-23 21:23 ` Werner Almesberger
2006-03-23 21:43 ` Jeff Dike
2006-03-24 0:37 ` Blaisorblade
2006-03-24 2:26 ` Jeff Dike
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=200603172314.47124.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=jdike@addtoit.com \
--cc=rob@landley.net \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=wa@almesberger.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.