Go to the documentation of this file.
18 #ifndef __LIBPOSIX_UNISTD_H
19 #define __LIBPOSIX_UNISTD_H
38 #define _POSIX_VERSION 200809L
45 #define _POSIX2_VERSION 200809L
79 extern C ssize_t read(
int fildes,
void *buf,
size_t nbyte);
97 extern C ssize_t write(
int fildes,
const void *buf,
size_t nbyte);
108 extern C int close(
int fildes);
140 extern C int forkexec(
const char *path,
const char *argv[]);
189 extern C char *
getcwd(
char *buf,
size_t size);
205 extern C int chdir(
const char *path);
212 extern C int unlink(
const char *path);
221 extern C unsigned int sleep(
unsigned int seconds);
C int gethostname(char *name, size_t namelen)
Get name of current host.
sint off_t
Used for file sizes.
C ssize_t write(int fildes, const void *buf, size_t nbyte)
Write on a file.
C char * getcwd(char *buf, size_t size)
Get the pathname of the current working directory.
C pid_t getpid()
Get the process ID.
unsigned long Address
A memory address.
C ssize_t read(int fildes, void *buf, size_t nbyte)
Read from a file.
#define C
Used to define external C functions.
C int close(int fildes)
Close a file descriptor.
C pid_t getppid()
Get parent process ID.
C unsigned int sleep(unsigned int seconds)
Sleep for the specified number of seconds.
unsigned int Size
Any sane size indicator cannot go negative.
C int unlink(const char *path)
Remove a file from the filesystem.
C int forkexec(const char *path, const char *argv[])
Create a new process and execute program.
C off_t lseek(int fildes, off_t offset, int whence)
Move the read/write file offset.
ProcessID pid_t
Used for process IDs and process group IDs.
C int chdir(const char *path)
Change working directory.
C int spawn(Address program, Size programSize, const char *argv[])
Create a new process using in-memory image.
slong ssize_t
Used for a count of bytes or an error indication.