-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathspawn.h
More file actions
64 lines (52 loc) · 2.26 KB
/
Copy pathspawn.h
File metadata and controls
64 lines (52 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
///////////////////////////////////////////////////////////////////////////////
////// Licensed Materials - Property of IBM
////// ZOSLIB
////// (C) Copyright IBM Corp. 2022. All Rights Reserved.
////// US Government Users Restricted Rights - Use, duplication
////// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
///////////////////////////////////////////////////////////////////////////////////
#ifndef ZOS_SPAWN_H
#define ZOS_SPAWN_H
#include "zos-macros.h"
#include_next <spawn.h>
#ifdef __cplusplus
extern "C" {
#endif
#define POSIX_SPAWN_SETPGROUP 0x02
#define POSIX_SPAWN_SETSIGMASK 0x08
#define POSIX_SPAWN_USEVFORK 0x40
#define POSIX_SPAWN_SETSIGDEF 0x01
#define POSIX_SPAWN_SETSCHEDPARAM 0x04
#define POSIX_SPAWN_SETSCHEDULER 0x10
#define POSIX_SPAWN_RESETIDS 0x20
typedef struct posix_spawn_file_actions_t {
struct _spawn_actions *actions;
} posix_spawn_file_actions_t;
typedef struct posix_spawnattr_t {
sigset_t *mask;
short flags;
} posix_spawnattr_t;
__Z_EXPORT int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
__Z_EXPORT int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *,
int pipe_fd);
__Z_EXPORT int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *, int,
const char *, int flags, mode_t);
__Z_EXPORT int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int pipe_fd,
int fd);
__Z_EXPORT int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
__Z_EXPORT int posix_spawnattr_init(posix_spawnattr_t *);
__Z_EXPORT int posix_spawnattr_setsigmask(posix_spawnattr_t *, sigset_t *mask);
__Z_EXPORT int posix_spawnattr_setflags(posix_spawnattr_t *, short flags);
__Z_EXPORT int posix_spawnattr_destroy(posix_spawnattr_t *);
__Z_EXPORT int posix_spawn(pid_t *pid, const char *path,
const posix_spawn_file_actions_t *act,
const posix_spawnattr_t *, char *const args[],
char *const env[]);
__Z_EXPORT int posix_spawnp(pid_t *pid, const char *file,
const posix_spawn_file_actions_t *act,
const posix_spawnattr_t *, char *const args[],
char *const env[]);
#ifdef __cplusplus
}
#endif
#endif