File: prochandle.h

package info (click to toggle)
avscan 1.1.2-openssl-1etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,636 kB
  • ctags: 2,292
  • sloc: ansic: 35,654; cpp: 3,498; makefile: 123; sh: 3
file content (63 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
	Process handling
 */


#ifndef PROCHANDLE_H
#define PROCHANDLE_H

#include <sys/types.h>


#ifdef __cplusplus
extern "C" {
#endif


extern char **ExecExplodeCommand(const char *cmd, int *strc);

extern int ExecProcessExists(pid_t pid);

extern float ExecCPUGetLoad(int cpu_num);

/* Regular execute, uses system(). This is for backwards compatability,
 * but has security issues since it uses system()
 */
extern void Execute(const char *cmd);

/* Non-blocking executes. */
extern pid_t Exec(const char *cmd);
extern pid_t ExecO(
	const char *cmd, const char *stdout_path
);
extern pid_t ExecOE(
	const char *cmd, const char *stdout_path, const char *stderr_path
);
extern pid_t ExecAO(
	const char *cmd, const char *stdout_path
);
extern pid_t ExecAOE(
	const char *cmd, const char *stdout_path, const char *stderr_path
);

/* Blocking executes. */
extern pid_t ExecB(const char *cmd);
extern pid_t ExecBO(
	const char *cmd, const char *stdout_path
);
extern pid_t ExecBOE(
	const char *cmd, const char *stdout_path, const char *stderr_path
);
extern pid_t ExecBAO(
	const char *cmd, const char *stdout_path
);
extern pid_t ExecBAOE(
	const char *cmd, const char *stdout_path, const char *stderr_path
);


#ifdef __cplusplus
}
#endif

#endif	/* PROCHANDLE_H */