nix

Module unistd

Source
Expand description

Safe wrappers around functions found in libc “unistd.h” header

Modules§

Structs§

  • Options for access()
  • Group identifier
  • Representation of a Group, based on libc::group
  • Process identifier
  • User identifier
  • Representation of a User, based on libc::passwd

Enums§

Constants§

  • Constant for UID = 0

Functions§

  • Checks the file named by path for accessibility according to the flags given by amode See access(2)
  • Change the current working directory of the calling process (see chdir(2)).
  • Change the ownership of the file at path to be owned by the specified owner (user) and group (see chown(2)).
  • Close a raw file descriptor
  • Create a copy of the specified file descriptor (see dup(2)).
  • Create a copy of the specified file descriptor using the specified fd (see dup(2)).
  • Create a new copy of the specified file descriptor using the specified fd and flags (see dup(2)).
  • Replace the current process image with a new one (see exec(3)).
  • Replace the current process image with a new one (see execve(2)).
  • Replace the current process image with a new one and replicate shell PATH searching behavior (see exec(3)).
  • Checks the file named by path for accessibility according to the flags given by mode
  • Change the ownership of the file referred to by the open file descriptor fd to be owned by the specified owner (user) and group (see fchown(2)).
  • Change the ownership of the file at path to be owned by the specified owner (user) and group.
  • Synchronize the data of a file
  • fork
    Create a new child process duplicating the parent process (see fork(2)).
  • Like pathconf, but works with file descriptors instead of paths (see fpathconf(2))
  • Synchronize changes to a file
  • Truncate a file to a specified length
  • Returns the current directory as a PathBuf
  • Get the effective group ID
  • Get the effective user ID
  • Get the real group ID
  • Calculate the supplementary group access list.
  • Get the list of supplementary group IDs of the calling process.
  • Get the host name and store it in an internally allocated buffer, returning an OsString on success (see gethostname(2)).
  • Get the group id of the calling process (see getpgrp(3)).
  • Get the pid of this process (see getpid(2)).
  • Get the pid of this processes’ parent (see getpid(2)).
  • Get the process group ID of a session leader getsid(2).
  • Get a real user ID
  • Initialize the supplementary group access list.
  • Link one file to another file
  • Move the read/write file offset.
  • Creates new directory path with access rights mode. (see mkdir(2))
  • Creates new fifo special file (named pipe) with path path and access rights mode.
  • Creates new fifo special file (named pipe) with path path and access rights mode.
  • Creates a regular file which persists even after process termination
  • Get path-dependent configurable system variables (see pathconf(2))
  • Suspend the thread until a signal is received.
  • Create an interprocess channel.
  • Read from a raw file descriptor.
  • Set the effective group ID
  • Set the effective user ID
  • Set the group ID
  • Set the list of supplementary group IDs for the calling process.
  • Set the system host name (see sethostname(2)).
  • Set a process group ID (see setpgid(2)).
  • Create new session and set process group id (see setsid(2)).
  • Set the user ID
  • Suspend execution for an interval of time
  • Creates a symbolic link at path2 which points to path1.
  • Get configurable system variables (see sysconf(3))
  • Get the terminal foreground process group (see tcgetpgrp(3)).
  • Set the terminal foreground process group (see tcgetpgrp(3)).
  • Remove a directory entry
  • Remove a directory entry
  • Write to a raw file descriptor.