processes.c header.
More...
#include <sys/types.h>
Go to the source code of this file.
|
pid_t | create_process (process_func_t, void *) |
| Create a new process (fork). More...
|
|
int | terminate_process (pid_t) |
| Send SIGTERM to the pid process. Try to wait the the process. In case of the process has still not change the state, it sends SIGKILL to the process and must be waited later to avoid leaving a zombie process. More...
|
|
◆ process_func_t
typedef void(* process_func_t) (void *) |
◆ create_process()
Create a new process (fork).
◆ terminate_process()
int terminate_process |
( |
pid_t |
pid | ) |
|
Send SIGTERM to the pid process. Try to wait the the process. In case of the process has still not change the state, it sends SIGKILL to the process and must be waited later to avoid leaving a zombie process.
- Parameters
-
[in] | pid | Process id to terminate. |
- Returns
- 0 on success, -1 if the process was waited but not changed the state