libc_spawn/unix/notbsd/
linux.rs

1use libc;
2
3#[repr(C)]
4#[derive(Copy, Clone)]
5pub struct posix_spawnattr_t {
6    flags: libc::c_short,
7    pgrp: libc::pid_t,
8    sd: libc::sigset_t,
9    ss: libc::sigset_t,
10    sp: libc::sched_param,
11    policy: libc::c_int,
12    pad: [libc::c_int; 16],
13}
14
15#[repr(C)]
16#[derive(Copy, Clone)]
17struct _spawn_action {
18    _dummy: usize
19}
20
21#[repr(C)]
22#[derive(Copy, Clone)]
23pub struct posix_spawn_file_actions_t {
24    allocated: libc::c_int,
25    used: libc::c_int,
26    actions: * mut _spawn_action,
27    pad: [libc::c_int; 16],
28}
29
30pub const POSIX_SPAWN_RESETIDS: libc::c_short = 0x01;
31pub const POSIX_SPAWN_SETPGROUP: libc::c_short = 0x02;
32pub const POSIX_SPAWN_SETSIGDEF: libc::c_short = 0x04;
33pub const POSIX_SPAWN_SETSIGMASK: libc::c_short = 0x08;
34pub const POSIX_SPAWN_SETSCHEDPARAM: libc::c_short = 0x10;
35pub const POSIX_SPAWN_SETSCHEDULER: libc::c_short = 0x20;
36
37
38pub const POSIX_SPAWN_USEVFORK: libc::c_short = 0x40;
39
40extern {
41
42    pub fn posix_spawnattr_getschedpolicy (attr: * const posix_spawnattr_t, schedpolicy: * mut libc::c_int) -> libc::c_int;
43
44    pub fn posix_spawnattr_setschedpolicy (attr: * mut posix_spawnattr_t, schedpolicy: libc::c_int) -> libc::c_int;
45
46    pub fn posix_spawnattr_getschedparam (attr: * const posix_spawnattr_t, sigmask: * mut libc::sched_param) -> libc::c_int;
47
48    pub fn posix_spawnattr_setschedparam (attr: * mut posix_spawnattr_t, sigmask: * const libc::sched_param) -> libc::c_int;
49
50}