blob: 179b9fa5e2afac29b29339d7d9cce2bb3dd53389 (
plain)
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
|
#ifndef _PROCESS_H
#define _PROCESS_H
#include <stdbool.h>
#include <stdint.h>
#ifdef _WIN32
typedef HANDLE fd_t;
#else
typedef int fd_t;
#endif
struct platform_process;
struct process {
uint64_t id;
fd_t stdin_;
fd_t stdout_;
fd_t stderr_;
struct platform_process *impl;
};
struct process_create_result {
bool ok;
const char *error_message;
};
struct process_create_result process_create(char *const command[],
struct process *result);
void process_destroy(struct process *p);
bool process_running(const struct process *p);
bool process_kill(const struct process *p);
#endif
|