Creates new threads.
More...
#include "processes.h"
#include "sighand.h"
#include <errno.h>
#include <glib.h>
#include <gvm/base/logging.h>
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
◆ G_LOG_DOMAIN
#define G_LOG_DOMAIN "sd main" |
◆ create_process()
Create a new process (fork).
◆ init_child_signal_handlers()
static void init_child_signal_handlers |
( |
void |
| ) |
|
|
static |
◆ 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