summaryrefslogtreecommitdiff
path: root/proc.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-12-15 23:09:10 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-12-17 09:40:50 +0100
commit1e3a2970549d294a1ab31f3088cbdcc2affbba42 (patch)
tree7eace0657d677a1d1be0b3130a4f7ff4dab7764b /proc.h
parentaec98a903f19ae408fe699ff0963b90990c46d83 (diff)
proc: Add function to execute process with argv list
Add proc_exec function which executes given process with argv list via fork + execvp. It allows to replace 'system' call approach which is used for invoking cpp and securely extend it with additional options like -D. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/proc.h b/proc.h
index 996ce06..9220b2a 100644
--- a/proc.h
+++ b/proc.h
@@ -7,5 +7,6 @@ extern void cpu_affinity(int cpu);
extern int set_proc_prio(int prio);
extern int set_sched_status(int policy, int priority);
extern ssize_t proc_get_cmdline(unsigned int pid, char *cmdline, size_t len);
+extern int proc_exec(const char *proc, char *const argv[]);
#endif /* PROC_H */