Commit | Line | Data |
---|---|---|
5f03e364 J |
1 | diff --git a/src/posix_spawn.h b/src/posix_spawn.h |
2 | new file mode 100644 | |
3 | index 0000000..ccfb0f0 | |
4 | --- /dev/null | |
5 | +++ b/src/posix_spawn.h | |
6 | @@ -0,0 +1,53 @@ | |
7 | +/* | |
8 | + * dhcpcd - DHCP client daemon | |
9 | + * Copyright (c) 2006-2012 Roy Marples <roy@marples.name> | |
10 | + * All rights reserved | |
11 | + | |
12 | + * Redistribution and use in source and binary forms, with or without | |
13 | + * modification, are permitted provided that the following conditions | |
14 | + * are met: | |
15 | + * 1. Redistributions of source code must retain the above copyright | |
16 | + * notice, this list of conditions and the following disclaimer. | |
17 | + * 2. Redistributions in binary form must reproduce the above copyright | |
18 | + * notice, this list of conditions and the following disclaimer in the | |
19 | + * documentation and/or other materials provided with the distribution. | |
20 | + * | |
21 | + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
22 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
23 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
24 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
25 | + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
26 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
27 | + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
28 | + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
29 | + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
30 | + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
31 | + * SUCH DAMAGE. | |
32 | + */ | |
33 | + | |
34 | +#ifndef POSIX_SPAWN_H | |
35 | +#define POSIX_SPAWN_H | |
36 | + | |
37 | +#include <signal.h> | |
38 | + | |
39 | +typedef struct { | |
40 | + short posix_attr_flags; | |
41 | +#define POSIX_SPAWN_SETSIGDEF 0x10 | |
42 | +#define POSIX_SPAWN_SETSIGMASK 0x20 | |
43 | + sigset_t posix_attr_sigmask; | |
44 | + sigset_t posix_attr_sigdefault; | |
45 | +} posix_spawnattr_t; | |
46 | + | |
47 | +typedef struct { | |
48 | +// int unused; | |
49 | +} posix_spawn_file_actions_t; | |
50 | + | |
51 | +int posix_spawn(pid_t *, const char *, | |
52 | + const posix_spawn_file_actions_t *, const posix_spawnattr_t *, | |
53 | + char *const [], char *const []); | |
54 | +int posix_spawnattr_init(posix_spawnattr_t *); | |
55 | +int posix_spawnattr_setflags(posix_spawnattr_t *, short); | |
56 | +int posix_spawnattr_setsigmask(posix_spawnattr_t *, const sigset_t *); | |
57 | +int posix_spawnattr_setsigdefault(posix_spawnattr_t *, const sigset_t *); | |
58 | + | |
59 | +#endif |