From 8a84f6b751f54b71f2476beef2eec10a9c919f36 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 24 Apr 2000 13:54:23 +0200 Subject: Improved process handling --- tools.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools.h') 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 #include #include +#include +#include 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: -- cgit v1.2.3