diff options
author | Frank Schmirler <schmirl@puter.linogate.de> | 2010-12-02 08:53:01 +0100 |
---|---|---|
committer | Frank Schmirler <schmirl@puter.linogate.de> | 2010-12-02 08:53:01 +0100 |
commit | 5e30711bfdb28085234a5ef6da4f4e44305ac3e4 (patch) | |
tree | d15809d23eeeed7fda55d9450b1af7c99d6eb5d6 /patches/thread.c.diff | |
download | vdr-plugin-streamdev-5e30711bfdb28085234a5ef6da4f4e44305ac3e4.tar.gz vdr-plugin-streamdev-5e30711bfdb28085234a5ef6da4f4e44305ac3e4.tar.bz2 |
Snapshot 2007-03-20
Diffstat (limited to 'patches/thread.c.diff')
-rw-r--r-- | patches/thread.c.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/thread.c.diff b/patches/thread.c.diff new file mode 100644 index 0000000..a03ffac --- /dev/null +++ b/patches/thread.c.diff @@ -0,0 +1,29 @@ +--- vdr-vanilla/thread.c 2003-10-10 18:19:15.000000000 +0200 ++++ vdr-vanilla-thread/thread.c 2003-10-10 18:43:36.000000000 +0200 +@@ -158,12 +158,21 @@ + + bool cThread::Active(void) + { +- if (threadPid) { +- if (kill(threadPid, SIGIO) < 0) { // couldn't find another way of checking whether the thread is still running - any ideas? +- if (errno == ESRCH) +- threadPid = 0; +- else ++ if (thread) { ++ /* ++ * Single UNIX Spec v2 says: ++ * ++ * The pthread_kill() function is used to request ++ * that a signal be delivered to the specified thread. ++ * ++ * As in kill(), if sig is zero, error checking is ++ * performed but no signal is actually sent. ++ */ ++ int err; ++ if ((err = pthread_kill(thread, 0)) != 0) { ++ if (err != ESRCH) + LOG_ERROR; ++ thread = 0; + } + else + return true; |