Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save martinomburajr/48138c30a655925b8e2af18883ce44b5 to your computer and use it in GitHub Desktop.

Select an option

Save martinomburajr/48138c30a655925b8e2af18883ce44b5 to your computer and use it in GitHub Desktop.
Open - Create - OpenAt - Read- Write - Seek Unix Syscalls
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
int creat(const char *pathname, mode_t mode);
int openat(int dirfd, const char *pathname, int flags);
int openat(int dirfd, const char *pathname, int flags, mode_t mode);
ssize_t read(int fd, void *buf, size_t count);
ssize_t write(int fd, const void *buf, size_t count);
off_t lseek(int fd, off_t offset, int whence);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment