<html><head></head><body>alarm() always works. VLC timer can get corrupted on bugs. So rather not.<br><br><div class="gmail_quote">Le 28 novembre 2018 11:03:53 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><br><br>On Tue, Nov 27, 2018, at 19:42, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le tiistaina 27. marraskuuta 2018, 16.02.18 EET Thomas Guillem a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><hr> test/libvlc/test.h | 15 ++++++++++++++-<br> 1 file changed, 14 insertions(+), 1 deletion(-)<br><br>diff --git a/test/libvlc/test.h b/test/libvlc/test.h<br>index 57bf787514..641e52d688 100644<br>--- a/test/libvlc/test.h<br>+++ b/test/libvlc/test.h<br>@@ -41,7 +41,7 @@<br> #include <stdlib.h><br> #include <stdbool.h><br> #include <unistd.h><br>-<br>+#include <signal.h><br><br> /*********************************************************************<br>  * Some useful global var<br>@@ -65,6 +65,13 @@ static const char test_default_video[] =<br>SRCDIR"/samples/image.jpg";<br><br> #define test_log( ... ) printf( "testapi: " __VA_ARGS__ );<br><br>+static inline void on_sigalrm(int signum)<br>+{<br>+    fprintf(stderr, "ERROR: test timeout\n");<br>+    /* Raise SIGABRT in order to cause a core dump */<br>+    raise(SIGABRT);<br>+}<br>+<br></blockquote>UB / not signal-safe.<br></blockquote><br>Ah yes, I checked that raise() is async-signal-safe and then added  fprintf() at the last time.<br>So, I must remove the fprintf.<br><br>What about just using vlc_timer ? This will be a first step to have tests on win32.<br><br>> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">-- <br>Реми Дёни-Курмон<br><a href="http://www.remlab.net/">http://www.remlab.net/</a><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>