Loading...
Searching...
No Matches
exec.h
Go to the documentation of this file.
#pragma once
/* (C) 2019 by Harald Welte <laforge@gnumonks.org>
*
* All Rights Reserved
*
* SPDX-License-Identifier: GPL-2.0+
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
extern const char *osmo_environment_whitelist[];
int osmo_environment_filter(char **out, size_t out_len, char **in, const char **whitelist);
int osmo_environment_append(char **out, size_t out_len, char **in);
int osmo_close_all_fds_above(int last_fd_to_keep);
int osmo_system_nowait2(const char *command, const char **env_whitelist, char **addl_env, const char *user);
int osmo_system_nowait(const char *command, const char **env_whitelist, char **addl_env);
osmo_system_nowait
int osmo_system_nowait(const char *command, const char **env_whitelist, char **addl_env)
call an external shell command without waiting for it.
Definition exec.c:284
osmo_environment_append
int osmo_environment_append(char **out, size_t out_len, char **in)
append one environment to another; only copying pointers, not actual strings.
Definition exec.c:138
osmo_close_all_fds_above
int osmo_close_all_fds_above(int last_fd_to_keep)
Definition exec.c:164
osmo_system_nowait2
int osmo_system_nowait2(const char *command, const char **env_whitelist, char **addl_env, const char *user)
call an external shell command as 'user' without waiting for it.
Definition exec.c:208
osmo_environment_filter
int osmo_environment_filter(char **out, size_t out_len, char **in, const char **whitelist)
filtered a process environment by whitelist; only copying pointers, no actual strings.
Definition exec.c:82
osmo_environment_whitelist
const char * osmo_environment_whitelist[]
suggested list of environment variables to pass (if they exist) to a sub-process/script
Definition exec.c:38