apio
531afc3d6f
execv() is a temporary wrapper that ignores the second parameter, while execve() and execvp() still error out.
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
#ifndef _UNISTD_H
|
|
#define _UNISTD_H
|
|
|
|
#include <bits/seek.h>
|
|
#include <sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
/* Executes the program program. On success, does not return. The second parameter (arguments) is not implemented
|
|
* for now. You can pass NULL to it. */
|
|
int execv(const char* program, char* const[]);
|
|
|
|
/* Not implemented. */
|
|
int execve(const char*, char* const[], char* const[]);
|
|
/* Not implemented. */
|
|
int execvp(const char*, char* const[]);
|
|
/* Not implemented. */
|
|
pid_t fork(void);
|
|
|
|
/* Calls the kernel for a specific service, determined by number. */
|
|
long syscall(long number, ...);
|
|
|
|
/* Suspends execution for a chosen amount of seconds. */
|
|
unsigned int sleep(unsigned int seconds);
|
|
|
|
/* Reads count bytes from the file descriptor fd into the memory at buf. */
|
|
ssize_t read(int fd, void* buf, size_t count);
|
|
|
|
/* Writes count bytes of the memory at buf to the file descriptor fd. */
|
|
ssize_t write(int fd, const void* buf, size_t count);
|
|
|
|
/* Closes the file descriptor fd. */
|
|
int close(int fd);
|
|
|
|
/* Moves the read/write file offset for fd to offset, depending on whence. */
|
|
off_t lseek(int fd, off_t offset, int whence);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |