TrueBitFoundation / ocaml-offchain

Fork of WebAssembly reference interpreter with support for generating proofs needed for blockchain verification
Apache License 2.0
44 stars 10 forks source link

What do these system calls do? #58

Open mrsmkl opened 7 years ago

mrsmkl commented 7 years ago
  1. mknod . what is this?
  2. Access: what is this?
  3. Ioctl
  4. umask
  5. Readlink: ???
  6. Msync: ???
  7. Fcntl64
  8. Mknodat
  9. Faccessat
  10. Fallocate
terminaldweller commented 7 years ago

mknod : creates a file system node (file, device special file or named pipe) access : checks the access rights of the calling pid to a directory provided ioctl : changes the parameters of a device drive through accessing the device file umask : sets the file creation mask (for example when you fork a child process you use this to manipulate the child process' access rights) readlink : print the value of a symlink msync : flushes changes to a file. its mostly there to ensure file intergrity in case something goes bad during making changes to the memory-mapped copy of a file since munmap will unmap the file regardless. fcntl64 ; performs operations on the fd based on the "cmd" arg passed to it mknodat : does the same as mknod plus takes an extra arg that open the fs node relative to that arg instead of CWD faccessat : the same as access plus an extra arg. the path arg will ne relative to this extra arg instead of CWD fallocate : either deallocate or preallocate disk space to a file on filesystems that support it