Stub out system functions for testing (WIP).
[oweals/dinit.git] / src / tests / test-includes / baseproc-sys.h
1 #include <sys/types.h>
2
3 // Mock system functions for testing.
4
5 namespace bp_sys {
6
7 inline int pipe2(int pipefd[2], int flags)
8 {
9     abort();
10     return 0;
11 }
12
13 inline int fcntl(int fd, int cmd, ...)
14 {
15     // This is used for setting the CLOEXEC flag, we can just return 0:
16     return 0;
17 }
18
19 inline int close(int fd)
20 {
21     abort();
22     return 0;
23 }
24
25 inline int kill(pid_t pid, int sig)
26 {
27     abort();
28     return 0;
29 }
30
31 }