libdaemon 0.14
dexec.h
Go to the documentation of this file.
1#ifndef foodexechfoo
2#define foodexechfoo
3
4/***
5 This file is part of libdaemon.
6
7 Copyright 2003-2008 Lennart Poettering
8
9 libdaemon is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation, either version 2.1 of the
12 License, or (at your option) any later version.
13
14 libdaemon is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with libdaemon. If not, see
21 <http://www.gnu.org/licenses/>.
22***/
23
24#include <stdarg.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
39#define DAEMON_EXEC_AVAILABLE 1
40
41#if defined(__GNUC__) && ! defined(DAEMON_GCC_SENTINEL)
42#define DAEMON_GCC_SENTINEL __attribute__ ((sentinel))
43#else
45#define DAEMON_GCC_SENTINEL
46#endif
47
63int daemon_exec(const char *dir, int *ret, const char *prog, ...) DAEMON_GCC_SENTINEL;
64
68#define DAEMON_EXECV_AVAILABLE 1
69
73int daemon_execv(const char *dir, int *ret, const char *prog, va_list ap);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif
#define DAEMON_GCC_SENTINEL
A macro for making use of GCCs printf compilation warnings.
Definition: dexec.h:45
int daemon_exec(const char *dir, int *ret, const char *prog,...) DAEMON_GCC_SENTINEL
Run the specified executable with the specified arguments in the specified directory and return the r...
int daemon_execv(const char *dir, int *ret, const char *prog, va_list ap)
The same as daemon_exec, but without variadic arguments.