18#include <FreeNOS/User.h>
27int forkexec(
const char *path,
const char *argv[])
33 if (
stat(path, &st) != 0)
Decompress data using the LZ4 algorithm created by Yann Collet.
Result initialize()
Initialize the decompressor.
u64 getUncompressedSize() const
Get size of the uncompressed data.
Result read(void *buffer, const Size size) const
Reads compressed data.
API::Result VMCtl(const ProcessID procID, const MemoryOperation op, Memory::Range *range=ZERO)
Prototype for user applications.
int forkexec(const char *path, const char *argv[])
Create a new process and execute program.
C int open(const char *path, int oflag,...)
Open file relative to directory file descriptor.
#define EFAULT
Bad address.
C int close(int fildes)
Close a file descriptor.
C int errno
The lvalue errno is used by many functions to return error values.
#define O_RDONLY
Open for reading only.
C ssize_t read(int fildes, void *buf, size_t nbyte)
Read from a file.
C int spawn(Address program, Size programSize, const char *argv[])
Create a new process using in-memory image.
Size size
Size in number of bytes.
Address phys
Physical address.
Address virt
Virtual address.
Access access
Page access flags.
The <sys/stat.h> header shall define the stat structure.
off_t st_size
For regular files, the file size in bytes.