OpenVAS Scanner
7.0.0~git
|
Creates new threads. More...
#include "processes.h"
#include "sighand.h"
#include <errno.h>
#include <glib.h>
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | G_LOG_DOMAIN "sd main" |
GLib log domain. More... | |
Functions | |
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. More... | |
static void | init_child_signal_handlers () |
pid_t | create_process (process_func_t function, void *argument) |
Create a new process (fork). More... | |
Creates new threads.
Definition in file processes.c.
#define G_LOG_DOMAIN "sd main" |
GLib log domain.
Definition at line 44 of file processes.c.
pid_t create_process | ( | process_func_t | function, |
void * | argument | ||
) |
Create a new process (fork).
Definition at line 97 of file processes.c.
References init_child_signal_handlers(), and pid.
Referenced by attack_network(), nasl_plugin_launch(), and plugins_init().
|
static |
Definition at line 82 of file processes.c.
References make_em_die(), openvas_signal, and sighand_segv().
Referenced by create_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.
[in] | pid | Process id to terminate. |
Definition at line 58 of file processes.c.
References pid.
Referenced by pluginlaunch_stop(), and update_running_processes().