dpkg 1.21.11
subproc.h
Go to the documentation of this file.
1/*
2 * libdpkg - Debian packaging suite library routines
3 * subproc.h - sub-process handling routines
4 *
5 * Copyright © 2008-2014 Guillem Jover <guillem@debian.org>
6 *
7 * This is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef LIBDPKG_SUBPROC_H
22#define LIBDPKG_SUBPROC_H
23
24#include <sys/types.h>
25
26#include <dpkg/macros.h>
27
29
49};
50
51void subproc_signals_ignore(const char *name);
52void subproc_signals_cleanup(int argc, void **argv);
54
55pid_t subproc_fork(void);
56int subproc_reap(pid_t pid, const char *desc, enum subproc_flags flags);
57
61
62#endif /* LIBDPKG_SUBPROC_H */
#define DPKG_BEGIN_DECLS
Definition: macros.h:86
#define DPKG_END_DECLS
Definition: macros.h:87
#define DPKG_BIT(n)
Return the integer value of bit n.
Definition: macros.h:125
subproc_flags
Definition: subproc.h:36
void subproc_signals_ignore(const char *name)
Definition: subproc.c:62
pid_t subproc_fork(void)
Definition: subproc.c:102
void subproc_signals_cleanup(int argc, void **argv)
Definition: subproc.c:81
int subproc_reap(pid_t pid, const char *desc, enum subproc_flags flags)
Definition: subproc.c:183
void subproc_signals_restore(void)
Definition: subproc.c:90
@ SUBPROC_NORMAL
Default subprocess flags.
Definition: subproc.h:38
@ SUBPROC_RETERROR
Do not emit errors, just return the exit status.
Definition: subproc.h:46
@ SUBPROC_RETSIGNO
Do not emit errors, just return the signal number.
Definition: subproc.h:48
@ SUBPROC_WARN
Emit a warning instead of an error.
Definition: subproc.h:40
@ SUBPROC_NOPIPE
Ignore SIGPIPE, and make it return 0.
Definition: subproc.h:42
@ SUBPROC_NOCHECK
Do not check the subprocess status.
Definition: subproc.h:44