From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Bodo Stroesser <bstroesser@fujitsu-siemens.com>, jdike@addtoit.com
Subject: Re: [uml-devel] [patch 1/1] uml: replace pause with sigsuspend
Date: Thu, 19 May 2005 15:35:50 +0200 [thread overview]
Message-ID: <200505191535.51279.blaisorblade@yahoo.it> (raw)
In-Reply-To: <428B9544.60902@fujitsu-siemens.com>
On Wednesday 18 May 2005 21:19, Bodo Stroesser wrote:
> Blaisorblade wrote:
> > On Tuesday 17 May 2005 12:14, Bodo Stroesser wrote:
> >>I didn't have the time to test the patch, but I guess, it won't work.
> >>
> >>Maybe, the man pages for sigsuspend are somewhat missleading, saying:
> >>
> >> The sigsuspend call temporarily replaces the signal mask for
> >> the process with that given by mask and then suspends the
> >> process until a signal is received.
> >
> > In fact, I assumed that was correct...
> >
> >>Reading the code of sys_sigsuspend() in arch/i386/kernel/signal.c,
> >>you'll find that it will return to user only, if do_signal() returns 1.
> >>This will happen, if there was a signal to deliver. Ignored signals
> >>will not be delivered, so sys_sigsupend will not return on SIGWINCH,
> >>if SIGWINCH handler is set to SIG_IGN.
> >
> > Doh! You're right, actually.
> >
> >>So, for UML's winch_handler, there is no difference between pause()
> >>and sigsuspend(), because sigsuspend's feature of accepting a sigmask
> >>for use while waiting, in fact isn't needed here as the same mask is
> >>set already before with sigprocmask().
> >
> > Ok, seems like I'll drop this patch. Thanks for the review.
> Maybe, we really should use sigsuspend() instead of pause(), but the
> reason for this isn't to remove the winch_handler.
> The current loop in winch_thread() might miss a SIGWINCH, if a SIGWINCH
> comes in while winch_thread() isn't waiting in wait().
wait()? You mean the pause()/sigsuspend() call, right? Then I probably agree.
> So I think, winch_thread() should block all signals including SIGWINCH.
> In its loop it should call sigsuspend() with a mask as argument, that
> unblocks SIGWINCH while sigsuspend() waits.
>
> I've attached a patch (tested a bit only).
>
> Bodo
--
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
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:[~2005-05-19 13:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-16 18:01 [uml-devel] [patch 1/1] uml: replace pause with sigsuspend blaisorblade
2005-05-17 10:14 ` Bodo Stroesser
2005-05-18 15:18 ` Blaisorblade
2005-05-18 19:19 ` Bodo Stroesser
2005-05-19 13:35 ` Blaisorblade [this message]
2005-05-19 13:39 ` Bodo Stroesser
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=200505191535.51279.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=bstroesser@fujitsu-siemens.com \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox