]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/exec-util.h
exec-util: in execute_directories, support initial exec environment
[thirdparty/systemd.git] / src / basic / exec-util.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
f18edd8a 2#pragma once
89711996 3
c6e47247
ZJS
4#include <stdbool.h>
5
89711996
ZJS
6#include "time-util.h"
7
c6e47247
ZJS
8typedef int (*gather_stdout_callback_t) (int fd, void *arg);
9
10enum {
11 STDOUT_GENERATE, /* from generators to helper process */
12 STDOUT_COLLECT, /* from helper process to main process */
13 STDOUT_CONSUME, /* process data in main process */
14 _STDOUT_CONSUME_MAX,
15};
16
17int execute_directories(
18 const char* const* directories,
19 usec_t timeout,
20 gather_stdout_callback_t const callbacks[_STDOUT_CONSUME_MAX],
21 void* const callback_args[_STDOUT_CONSUME_MAX],
78ec1bb4
DJL
22 char *argv[],
23 char *envp[]);
3303d1b2
ZJS
24
25extern const gather_stdout_callback_t gather_environment[_STDOUT_CONSUME_MAX];