summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-04-24 13:54:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-04-24 13:54:23 +0200
commit8a84f6b751f54b71f2476beef2eec10a9c919f36 (patch)
tree6ac7cba9fc3442720df93ad8232e6c1633d53981 /tools.h
parent61a20a36de5bf3b96c28a89d61f45ca58ec3d360 (diff)
downloadvdr-8a84f6b751f54b71f2476beef2eec10a9c919f36.tar.gz
vdr-8a84f6b751f54b71f2476beef2eec10a9c919f36.tar.bz2
Improved process handling
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools.h b/tools.h
index c6708332..3263b914 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.5 2000/04/24 09:46:05 kls Exp $
+ * $Id: tools.h 1.6 2000/04/24 13:09:20 kls Exp $
*/
#ifndef __TOOLS_H
@@ -13,6 +13,8 @@
#include <errno.h>
#include <stdio.h>
#include <syslog.h>
+#include <sys/wait.h>
+#include <sys/types.h>
extern int SysLogLevel;
@@ -24,6 +26,7 @@ extern int SysLogLevel;
#define LOG_ERROR_STR(s) esyslog(LOG_ERR, "ERROR: %s: %s", s, strerror(errno));
#define SECSINDAY 86400
+#define MAXPROCESSTIMEOUT 3 // seconds
#define DELETENULL(p) (delete (p), p = NULL)
@@ -36,6 +39,8 @@ int time_ms(void);
void delay_ms(int ms);
bool MakeDirs(const char *FileName, bool IsDirectory = false);
bool RemoveFileOrDir(const char *FileName);
+bool CheckProcess(pid_t pid);
+void KillProcess(pid_t pid, int Timeout = MAXPROCESSTIMEOUT);
class cListObject {
private: