Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: pierre-marc.fournier@polymtl.ca (Pierre-Marc Fournier)
Subject: [ltt-dev] UST use case: Tracing QEMU/KVM
Date: Thu, 27 May 2010 12:08:40 -0400	[thread overview]
Message-ID: <4BFE9908.7000500@polymtl.ca> (raw)
In-Reply-To: <20100524084150.GA2447@stefan-thinkpad.transitives.com>

Stefan Hajnoczi wrote:
> /*
>  * This example demonstrates the UST listener thread receiving signals and
>  * returning from poll().
>  *
>  * $ gcc -o poll_eintr poll_eintr.c -lust -lpthread
>  * $ ./poll_eintr
>  * main thread id=0x7f9c31a766a0
>  * ^CSIGINT handled in thread id=0x7f9c30ed7910
>  * libust[2615/2616]: Error: poll: Interrupted system call (in multipoll_poll() at ../libustcomm/multipoll.c:84)
>  * libust[2615/2616]: Error: error in multipoll_poll (in listener_main() at tracectl.c:1015)
>  *
>  * This happens because all other threads have SIGINT blocked, whereas libust
>  * does not block signals in the client thread.  Therefore the signal is
>  * handled in the client thread, poll() is interrupted, and an error is
>  * printed.
>  *
>  * I think the correct behavior is to block signals in the client thread so it
>  * will not interfere with signal handling of the main program.
>  */

I completely agree. I just pushed a change that blocks all signals in 
the listener thread.

Thanks!



  reply	other threads:[~2010-05-27 16:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24  8:41 Stefan Hajnoczi
2010-05-27 16:08 ` Pierre-Marc Fournier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-23 19:54 Stefan Hajnoczi
2010-05-24  3:57 ` Pierre-Marc Fournier
2010-05-24  9:00   ` Stefan Hajnoczi
2010-05-26 22:46     ` Pierre-Marc Fournier
2010-05-27  5:21       ` Stefan Hajnoczi
2010-05-27 19:36         ` Pierre-Marc Fournier
2010-05-27 20:22           ` Stefan Hajnoczi
2010-05-27 20:26             ` Mathieu Desnoyers

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=4BFE9908.7000500@polymtl.ca \
    --to=pierre-marc.fournier@polymtl.ca \
    /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