summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-09-15 13:00:58 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-09-15 13:00:58 +0200
commit7913b00daa6c95f4a8fdbc96793dc08f26a5f121 (patch)
tree7f3f93fed911b2380f8f869e1e5617e8cc55bcc7 /thread.h
parent37754870e0868f41549c63941ed4a236751e70e4 (diff)
downloadvdr-7913b00daa6c95f4a8fdbc96793dc08f26a5f121.tar.gz
vdr-7913b00daa6c95f4a8fdbc96793dc08f26a5f121.tar.bz2
Pipe to Dolby Digital replay command closes all unused file descriptors to avoid crashing when OSD is on
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/thread.h b/thread.h
index e8e796eb..221f9ac7 100644
--- a/thread.h
+++ b/thread.h
@@ -4,13 +4,14 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.h 1.8 2001/08/05 10:36:47 kls Exp $
+ * $Id: thread.h 1.9 2001/09/15 12:46:52 kls Exp $
*/
#ifndef __THREAD_H
#define __THREAD_H
#include <pthread.h>
+#include <stdio.h>
#include <sys/types.h>
class cMutex;
@@ -88,4 +89,19 @@ public:
#define LOCK_THREAD cThreadLock ThreadLock(this)
+// cPipe implements a pipe that closes all unnecessary file descriptors in
+// the child process.
+
+class cPipe {
+private:
+ pid_t pid;
+ FILE *f;
+public:
+ cPipe(void);
+ ~cPipe();
+ operator FILE* () { return f; }
+ bool Open(const char *Command, const char *Mode);
+ int Close(void);
+ };
+
#endif //__THREAD_H