Module nix::unistd

source ·
Expand description

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

Modules§

  • alarmsignal
    Alarm signal scheduling.

Structs§

  • Options for access()
  • Giduser
    Group identifier
  • Pidprocess
    Process identifier
  • Uiduser
    User identifier

Enums§

Constants§

  • ROOTuser
    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)).
  • chownuser and fs
    Change the ownership of the file at path to be owned by the specified owner (user) and group (see chown(2)).
  • Change a process’s root directory
  • Close a raw file descriptor
  • dupfs
    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)).
  • execvprocess
    Replace the current process image with a new one (see exec(3)).
  • execveprocess
    Replace the current process image with a new one (see execve(2)).
  • execvpprocess
    Replace the current process image with a new one and replicate shell PATH searching behavior (see exec(3)).
  • Change the current working directory of the process to the one given as an open file descriptor (see fchdir(2)).
  • fchownuser and fs
    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)).
  • forkprocess
    Create a new child process duplicating the parent process (see fork(2)).
  • fpathconffs and feature
    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
  • getgiduser
    Get the real group ID
  • Get the list of supplementary group IDs of the calling process.
  • gethostnamehostname
    Get the host name and store it in an internally allocated buffer, returning an OsString on success (see gethostname(2)).
  • getpgidprocess
    Get process group
  • getpgrpprocess
    Get the group id of the calling process (see getpgrp(3)).
  • getpidprocess
    Get the pid of this process (see getpid(2)).
  • getppidprocess
    Get the pid of this processes’ parent (see getpid(2)).
  • getuiduser
    Get a real user ID
  • Determines if the file descriptor refers to a valid terminal type device.
  • Move the read/write file offset.
  • Creates new directory path with access rights mode. (see mkdir(2))
  • mkdtempfs and feature
    Creates a directory which persists even after process termination
  • Creates a regular file which persists even after process termination
  • pathconffs and feature
    Get path-dependent configurable system variables (see pathconf(2))
  • Create an interprocess channel.
  • Like pipe, but allows setting certain file descriptor flags.
  • Read from a raw file descriptor.
  • Set the effective group ID
  • Set the effective user ID
  • setgiduser
    Set the group ID
  • setpgidprocess
    Set a process group ID (see setpgid(2)).
  • setsidprocess
    Create new session and set process group id (see setsid(2)).
  • setuiduser
    Set the user ID
  • Suspend execution for an interval of time
  • sysconffeature
    Get configurable system variables (see sysconf(3))
  • tcgetpgrpprocess and term
    Get the terminal foreground process group (see tcgetpgrp(3)).
  • tcsetpgrpprocess and term
    Set the terminal foreground process group (see tcgetpgrp(3)).
  • Get the name of the terminal device that is open on file descriptor fd (see ttyname(3)).
  • Remove a directory entry
  • Write to a raw file descriptor.