OpenVAS Scanner 23.23.1
processes.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Greenbone AG
2 * SPDX-FileCopyrightText: 2006 Software in the Public Interest, Inc.
3 * SPDX-FileCopyrightText: 1998-2006 Tenable Network Security, Inc.
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 */
7
12
13#ifndef OPENVAS_PROCESSES_H
14#define OPENVAS_PROCESSES_H
15
16#include "../misc/ipc.h"
17
18#include <sys/types.h> /* for pid_t */
19
20#define FORKFAILED -1
21#define NOINIT -2
22#define PROCSFULL -3
23#define NOCHILD -4
24
25typedef void (*process_func_t) (void *);
26
27void
29
30int
32
33pid_t
34create_ipc_process (ipc_process_func func, void *args);
35const struct ipc_contexts *
37
38int
40
41#endif
void(* ipc_process_func)(struct ipc_context *, void *)
Definition ipc.h:47
static pid_t pid
Definition nasl_cmd_exec.c:39
const struct ipc_contexts * procs_get_ipc_contexts(void)
returns ipc_contexts.
Definition processes.c:239
int procs_cleanup_children(void)
iterates through ipcc and verify if a child is stopped or killed to free the file handler.
Definition processes.c:47
void procs_terminate_childs(void)
This function terminates all processes spawned with create_process. Calls terminate_child for each pr...
Definition processes.c:113
int terminate_process(pid_t pid)
Terminates a given process. If termination does not work, the process will get killed....
Definition processes.c:96
void(* process_func_t)(void *)
Definition processes.h:25
pid_t create_ipc_process(ipc_process_func func, void *args)
initializes a communication channels and calls a function with a new process
Definition processes.c:195
Definition ipc.h:41