]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
89711996 ZJS |
2 | /*** |
3 | This file is part of systemd. | |
4 | ||
5 | Copyright 2017 Zbigniew Jędrzejewski-Szmek | |
6 | ||
7 | systemd is free software; you can redistribute it and/or modify it | |
8 | under the terms of the GNU Lesser General Public License as published by | |
9 | the Free Software Foundation; either version 2.1 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | systemd is distributed in the hope that it will be useful, but | |
13 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | Lesser General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU Lesser General Public License | |
18 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
19 | ***/ | |
20 | ||
c6e47247 ZJS |
21 | #include <stdbool.h> |
22 | ||
89711996 ZJS |
23 | #include "time-util.h" |
24 | ||
c6e47247 ZJS |
25 | typedef int (*gather_stdout_callback_t) (int fd, void *arg); |
26 | ||
27 | enum { | |
28 | STDOUT_GENERATE, /* from generators to helper process */ | |
29 | STDOUT_COLLECT, /* from helper process to main process */ | |
30 | STDOUT_CONSUME, /* process data in main process */ | |
31 | _STDOUT_CONSUME_MAX, | |
32 | }; | |
33 | ||
34 | int execute_directories( | |
35 | const char* const* directories, | |
36 | usec_t timeout, | |
37 | gather_stdout_callback_t const callbacks[_STDOUT_CONSUME_MAX], | |
38 | void* const callback_args[_STDOUT_CONSUME_MAX], | |
39 | char *argv[]); | |
3303d1b2 ZJS |
40 | |
41 | extern const gather_stdout_callback_t gather_environment[_STDOUT_CONSUME_MAX]; |