<div dir="ltr">Hi Ian,<div><br></div><div>Oh yes, good spot.  Originally I had an 'if' statement around each call but knowing that this was only a proposal I wanted to keep it shorter.  You're right, should be |=.</div>

<div style>As the comment on the ticket states I'll try <span style="font-family:arial,sans-serif;font-size:13px">g_unix_signal_add() approach in a spare moment and will look in glib if there's an opportunity to use signalfd() there.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Cheers,</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Kris </span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/12 Ian Davidson <span dir="ltr"><<a href="mailto:id012c3076@blueyonder.co.uk" target="_blank">id012c3076@blueyonder.co.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Kris,<br>
<br>
I have been looking at your code and I might be about to make a fool of myself - but here goes.<br>
<br>
You have coded some lines - I'll just quote 2<br>
  int res = 0;<br>
  res &= sigemptyset (&mask);<br>
<br>
It is the &= which bothers me.  Since ret starts off as zero, ANDing anything to that means that ret will continue to be zero. Shouldn't you have used |= ?<span class="HOEnZb"><font color="#888888"><br>
<br>
Ian</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 09/02/2013 16:45, Krzysztof Konopko wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 04/02/13 10:44, Krzysztof Konopko wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/02/13 23:39, Tim-Philipp Müller wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, 2013-02-02 at 16:58 +0000, Krzysztof Konopko wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think that gst-launch doesn't take the best approach to signal<br>
handling.  Use signalfd instead [1]. An example might be useful [2].<br>
<br>
You get a file descriptor which you can watch it with g_io_add_watch()<br>
[3].<br>
</blockquote>
Yes, that would indeed be better. However, we'll probably have to keep<br>
the old code for compatibility reasons anyway. Feel free to make a<br>
patch :)<br>
<br>
Cheers<br>
  -Tim<br>
<br>
</blockquote>
Oh yes, I'd like to grapple with it, although signalfd() is not directly<br>
available in all libc implementations, e. g. some uClibc versions do not<br>
provide it so need to make a syscall directly (need to roll out<br>
autotools/preprocessor machinery to cater for this).<br>
<br>
Also for SIGSEGV (and probably SIGBUS) still need to use the classic<br>
approach (these are some of which signals where originally designed for).<br>
<br>
So need to give it a bit of thinking in case of gst-launch. In user apps<br>
it seems to be of less hassle.<br>
<br>
Cheers,<br>
Kris<br>
<br>
<br>
</blockquote>
I gave it a go:<br>
<a href="https://bugzilla.gnome.org/show_bug.cgi?id=693481" target="_blank">https://bugzilla.gnome.org/<u></u>show_bug.cgi?id=693481</a><br>
<br>
Cheers,<br>
Kris<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</div></div></blockquote></div><br></div>