forked from aligrudi/neatlibc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unistd.h
46 lines (34 loc) · 857 Bytes
/
unistd.h
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
#include <stddef.h>
/* access() flags */
#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0
int access(char *name, int type);
int unlink(char *path);
extern char **environ;
int isatty(int fd);
int close(int fd);
long write(int fd, void *buf, long n);
long read(int fd, void *buf, long n);
/* lseek() whence */
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
long lseek(int fd, long offset, int whence);
int pipe(int fds[2]);
int dup(int fd);
int dup2(int fd, int fd2);
int fork(void);
int getpid(void);
int getppid(void);
int execve(char *path, char *argv[], char *envp[]);
int execle(char *path, ...);
int execvp(char *file, char *argv[]);
int execv(char *path, char *argv[]);
void _exit(int status);
int sleep(int n);
/* standard file descriptors */
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2