|
OpenVAS Scanner 23.32.3
|
processes.c header. More...


Go to the source code of this file.
Macros | |
| #define | FORKFAILED -1 |
| #define | NOINIT -2 |
| #define | PROCSFULL -3 |
| #define | NOCHILD -4 |
Typedefs | |
| typedef void(* | process_func_t) (void *) |
Functions | |
| void | procs_terminate_childs (void) |
| This function terminates all processes spawned with create_process. Calls terminate_child for each process active. In case init_procs was not called this function does nothing. | |
| int | terminate_process (pid_t pid) |
| Terminates a given process. If termination does not work, the process will get killed. Terminate process can be called with the (-1 * pid) to send the signal to the process group. | |
| pid_t | create_ipc_process (ipc_process_func func, void *args) |
| initializes a communication channels and calls a function with a new process | |
| const struct ipc_contexts * | procs_get_ipc_contexts (void) |
| returns ipc_contexts. | |
| int | procs_cleanup_children (void) |
| iterates through ipcc and verify if a child is stopped or killed to free the file handler. | |
processes.c header.
Definition in file processes.h.
| #define FORKFAILED -1 |
Definition at line 20 of file processes.h.
Referenced by create_ipc_process().
| #define NOCHILD -4 |
Definition at line 23 of file processes.h.
| #define NOINIT -2 |
Definition at line 21 of file processes.h.
| #define PROCSFULL -3 |
Definition at line 22 of file processes.h.
| typedef void(* process_func_t) (void *) |
Definition at line 25 of file processes.h.
| pid_t create_ipc_process | ( | ipc_process_func | func, |
| void * | args ) |
initializes a communication channels and calls a function with a new process
| func | Function to call |
| args | arguments |
Definition at line 195 of file processes.c.
References FORKFAILED, free(), ipc_exec_context::func, ipc_exec_context::func_arg, ipc_contexts_init(), ipc_exec_as_process(), IPC_PIPE, ipcc, ipc_context::pid, post_fn_call(), ipc_exec_context::post_func, pre_fn_call(), ipc_exec_context::pre_func, procs_cleanup_children(), and reuse_or_add_context().
Referenced by attack_network().


| int procs_cleanup_children | ( | void | ) |
iterates through ipcc and verify if a child is stopped or killed to free the file handler.
Definition at line 47 of file processes.c.
References ipc_close(), ipcc, and pid.
Referenced by create_ipc_process(), and pluginlaunch_wait_for_free_process().


| const struct ipc_contexts * procs_get_ipc_contexts | ( | void | ) |
returns ipc_contexts.
Definition at line 239 of file processes.c.
References ipcc.
Referenced by launch_plugin().

| void procs_terminate_childs | ( | void | ) |
This function terminates all processes spawned with create_process. Calls terminate_child for each process active. In case init_procs was not called this function does nothing.
Definition at line 113 of file processes.c.
References ipcc, and terminate_process().
Referenced by handle_termination_signal().


| int terminate_process | ( | pid_t | pid | ) |
Terminates a given process. If termination does not work, the process will get killed. Terminate process can be called with the (-1 * pid) to send the signal to the process group.
| pid | id of the child process |
Definition at line 96 of file processes.c.
References pid.
Referenced by pluginlaunch_stop(), procs_terminate_childs(), and update_running_processes().
