tripathysagar/man_text huggingface dataset:
# PR_MCE_KILL_SET

## NAME



           PR_MCE_KILL_SET - set the machine check memory corruption kill
           policy
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_MCE_KILL, PR_MCE_KILL_SET, long** _pol_**, 0L, 0L);**
    


## DESCRIPTION



           Use a thread-specific memory corruption kill policy.
    
           _pol_ defines whether the policy is _early kill_ (**PR_MCE_KILL_EARLY**),
           _late kill_ (**PR_MCE_KILL_LATE**), or the system-wide default
           (**PR_MCE_KILL_DEFAULT**).
    
           Early kill means that the thread receives a **SIGBUS** signal as soon
           as hardware memory corruption is detected inside its address
           space.
    
           In late kill mode, the process is killed only when it accesses a
           corrupted page.  See sigaction(2) for more information on the
           **SIGBUS** signal.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EINVAL** _pol_ is not a valid value.
    


## STANDARDS



           Linux.
    


* * *
# getgid

## NAME



           getgid, getegid - get group identity
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <unistd.h>**
    
           **gid_t getgid(void);**
           **gid_t getegid(void);**
    


## DESCRIPTION



           **getgid**() returns the real group ID of the calling process.
    
           **getegid**() returns the effective group ID of the calling process.
    


## ERRORS



           These functions are always successful and never modify _errno_.
    


## VERSIONS



           On Alpha, instead of a pair of **getgid**() and **getegid**() system
           calls, a single **getxgid**() system call is provided, which returns a
           pair of real and effective GIDs.  The glibc **getgid**() and **getegid**()
           wrapper functions transparently deal with this.  See syscall(2)
           for details regarding register mapping.
    


## STANDARDS



           POSIX.1-2008.
    


* * *
# uretprobe

## NAME



           uretprobe - execute pending return uprobes
    


## SYNOPSIS



           **int uretprobe(void);**
    


## DESCRIPTION



           **uretprobe**() is an alternative to breakpoint instructions for
           triggering return uprobe consumers.
    
           Calls to **uretprobe**() are only made from the user-space trampoline
           provided by the kernel.  Calls from any other place result in a
           **SIGILL**.
    


## RETURN VALUE



           The return value is architecture-specific.
    


## ERRORS



           **SIGILL uretprobe**() was called by a user-space program.
    


## VERSIONS



           The behavior varies across systems.
    


## STANDARDS



           None.
    


## CAVEATS



           **uretprobe**() exists only to allow the invocation of return uprobe
           consumers.  It should **never** be called directly.
    


* * *
# PR_GET_KEEPCAPS

## NAME



           PR_GET_KEEPCAPS - get the state of the "keep capabilities" flag
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_GET_KEEPCAPS);**
    


## DESCRIPTION



           Return the current state of the calling thread's "keep
           capabilities" flag.  See capabilities(7) for a description of this
           flag.
    


## RETURN VALUE



           On success, this call returns the boolean value described above.
           On error, -1 is returned, and _errno_ is set to indicate the error.
    


## STANDARDS



           Linux.
    


* * *
# PR_CAP_AMBIENT_IS_SET

## NAME



           PR_CAP_AMBIENT_IS_SET - read the ambient capability set of the
           calling thread
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, long** _cap_**, 0L, 0L);**
    


## DESCRIPTION



           This call returns 1 if the capability in _cap_ is in the ambient
           capability set and 0 if it is not.
    


## RETURN VALUE



           On success, this call returns the boolean value described above.
           On error, -1 is returned, and _errno_ is set to indicate the error.
    


## ERRORS



           **EINVAL** _cap_ does not specify a valid capability.
    


## VERSIONS



           See PR_CAP_AMBIENT(2const).
    


## STANDARDS



           Linux.
    


* * *
# KEYCTL_SESSION_TO_PARENT

## NAME



           KEYCTL_SESSION_TO_PARENT - set the parent process's session
           keyring
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/keyctl.h>  **/* Definition of **KEY*** constants */
           **#include <sys/syscall.h>   **/* Definition of **SYS_*** constants */
           **#include <unistd.h>**
    
           **long syscall(SYS_keyctl, KEYCTL_SESSION_TO_PARENT);**
    


## DESCRIPTION



           Replace the session keyring to which the _parent_ of the calling
           process subscribes with the session keyring of the calling
           process.
    
           The keyring will be replaced in the parent process at the point
           where the parent next transitions from kernel space to user space.
    
           The keyring must exist and must grant the caller _link_ permission.
           The parent process must be single-threaded and have the same
           effective ownership as this process and must not be set-user-ID or
           set-group-ID.  The UID of the parent process's existing session
           keyring (f it has one), as well as the UID of the caller's session
           keyring much match the caller's effective UID.
    
           The fact that it is the parent process that is affected by this
           operation allows a program such as the shell to start a child
           process that uses this operation to change the shell's session
           keyring.  (This is what the keyctl(1) **new_session** command does.)
    


## RETURN VALUE



           On success, 0 is returned.
    
           On error, -1 is returned, and _errno_ is set to indicate the error.
    


## ERRORS



           **EPERM** All of the UIDs (GIDs) of the parent process do not match
                  the effective UID (GID) of the calling process.
    
           **EPERM** The UID of the parent's existing session keyring or the UID
                  of the caller's session keyring did not match the effective
                  UID of the caller.
    
           **EPERM** The parent process is not single-threaded.
    
           **EPERM** The parent process is init(1) or a kernel thread.
    


## VERSIONS



           A wrapper is provided in the _libkeyutils_ library:
           keyctl_session_to_parent(3).
    


## STANDARDS



           Linux.
    


* * *
# TIOCSWINSZ

## NAME



           TIOCGWINSZ, TIOCSWINSZ - get and set window size
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <asm/termbits.h>  **/* Definition of **TIOC*WINSZ** constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, TIOCGWINSZ, struct winsize ***_argp_**);**
           **int ioctl(int** _fd_**, TIOCSWINSZ, const struct winsize ***_argp_**);**
    
           **#include <asm/termios.h>**
    
           **struct winsize {**
               **unsigned short ws_row;**
               **unsigned short ws_col;**
               **unsigned short ws_xpixel;** /* unused */
               **unsigned short ws_ypixel;** /* unused */
           **};**
    


## DESCRIPTION



           Window sizes are kept in the kernel, but not used by the kernel
           (except in the case of virtual consoles, where the kernel will
           update the window size when the size of the virtual console
           changes, for example, by loading a new font).
    
           **TIOCGWINSZ**
                  Get window size.
    
           **TIOCSWINSZ**
                  Set window size.
    
           When the window size changes, a **SIGWINCH** signal is sent to the
           foreground process group.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


* * *
# TCXONC

## NAME



           TCXONC - software flow control
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <asm/termbits.h>  **/* Definition of **TCXONC** */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, TCXONC, int** _arg_**);**
    


## DESCRIPTION



           Equivalent to _tcflow(fd, arg)_.
    
           See tcflow(3) for the argument values **TCOOFF** , **TCOON** , **TCIOFF** ,
           **TCION**.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


* * *
# PR_GET_SPECULATION_CTRL

## NAME



           PR_GET_SPECULATION_CTRL - get the state of a speculation
           misfeature for the calling thread
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_GET_SPECULATION_CTRL, long** _misfeature_**, 0L, 0L, 0L);**
    


## DESCRIPTION



           Return the state of the speculation misfeature specified in
           _misfeature_.
    
           Currently, _misfeature_ must be one of:
    
           **PR_SPEC_STORE_BYPASS**
                  Get the state of the speculative store bypass misfeature.
    
           **PR_SPEC_INDIRECT_BRANCH**(since Linux 4.20)
                  Get the state of the indirect branch speculation
                  misfeature.
    
           The return value uses bits 0-4 with the following meaning:
    
           **PR_SPEC_PRCTL**
                  Mitigation can be controlled per thread by
                  PR_SET_SPECULATION_CTRL(2const).
    
           **PR_SPEC_ENABLE**
                  The speculation feature is enabled, mitigation is disabled.
    
           **PR_SPEC_DISABLE**
                  The speculation feature is disabled, mitigation is enabled.
    
           **PR_SPEC_FORCE_DISABLE**
                  Same as **PR_SPEC_DISABLE** but cannot be undone.
    
           **PR_SPEC_DISABLE_NOEXEC**(since Linux 5.1)
                  Same as **PR_SPEC_DISABLE** , but the state will be cleared on
                  execve(2).
    
           If all bits are 0, then the CPU is not affected by the speculation
           misfeature.
    
           If **PR_SPEC_PRCTL** is set, then per-thread control of the mitigation
           is available.  If not set, PR_SET_SPECULATION_CTRL(2const) for the
           speculation misfeature will fail.
    


## RETURN VALUE



           On success, **PR_GET_SPECULATION_CTRL** returns the nonnegative value
           described above.  On error, -1 is returned, and _errno_ is set to
           indicate the error.
    


## ERRORS



           **ENODEV** The kernel or CPU does not support the requested
                  speculation _misfeature_.
    


## STANDARDS



           Linux.
    


* * *
# PR_TASK_PERF_EVENTS_DISABLE

## NAME



           PR_TASK_PERF_EVENTS_DISABLE, PR_TASK_PERF_EVENTS_ENABLE - disable
           or enable performance counters attached to the calling process
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_TASK_PERF_EVENTS_DISABLE);**
           **int prctl(PR_TASK_PERF_EVENTS_ENABLE);**
    


## DESCRIPTION



           **PR_TASK_PERF_EVENTS_DISABLE**
                  Disable all performance counters attached to the calling
                  process, regardless of whether the counters were created by
                  this process or another process.  Performance counters
                  created by the calling process for other processes are
                  unaffected.
    
           **PR_TASK_PERF_EVENTS_ENABLE**
                  The converse of **PR_TASK_PERF_EVENTS_DISABLE** ; enable
                  performance counters attached to the calling process.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## STANDARDS



           Linux.
    


* * *
# PR_SET_TSC

## NAME



           PR_SET_TSC - change whether the timestamp counter can be read by
           the process
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_SET_TSC, long** _flag_**);**
    


## DESCRIPTION



           Set the state of the flag determining whether the timestamp
           counter can be read by the process.  Pass **PR_TSC_ENABLE** to _flag_ to
           allow it to be read, or **PR_TSC_SIGSEGV** to generate a **SIGSEGV** when
           the process tries to read the timestamp counter.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EINVAL** _arg2_ is not a valid value.
    


## STANDARDS



           Linux.  x86 only.
    


* * *
# getcpu

## NAME



           getcpu - determine CPU and NUMA node on which the calling thread
           is running
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#define _GNU_SOURCE** /* See feature_test_macros(7) */
           **#include <sched.h>**
    
           **int getcpu(unsigned int *_Nullable** _cpu_**, unsigned int *_Nullable** _node_**);**
    


## DESCRIPTION



           The **getcpu**() system call identifies the processor and node on
           which the calling thread or process is currently running and
           writes them into the integers pointed to by the _cpu_ and _node_
           arguments.  The processor is a unique small integer identifying a
           CPU.  The node is a unique small identifier identifying a NUMA
           node.  When either _cpu_ or _node_ is NULL nothing is written to the
           respective pointer.
    
           The information placed in _cpu_ is guaranteed to be current only at
           the time of the call: unless the CPU affinity has been fixed using
           sched_setaffinity(2), the kernel might change the CPU at any time.
           (Normally this does not happen because the scheduler tries to
           minimize movements between CPUs to keep caches hot, but it is
           possible.)  The caller must allow for the possibility that the
           information returned in _cpu_ and _node_ is no longer current by the
           time the call returns.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EFAULT** Arguments point outside the calling process's address
                  space.
    


## STANDARDS



           Linux.
    


## NOTES



           Linux makes a best effort to make this call as fast as possible.
           (On some architectures, this is done via an implementation in the
           vdso(7).)  The intention of **getcpu**() is to allow programs to make
           optimizations with per-CPU data or for NUMA optimization.
    


* * *
# PR_SVE_GET_VL

## NAME



           PR_SVE_GET_VL - get the thread's SVE vector length
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_SVE_GET_VL);**
    


## DESCRIPTION



           Get the thread's current SVE vector length configuration.
    
           This operation returns a nonnegative value that describes the
           _current_ configuration.  The bits corresponding to
           **PR_SVE_VL_LEN_MASK** contain the currently configured vector length
           in bytes.  The bit corresponding to **PR_SVE_VL_INHERIT** indicates
           whether the vector length will be inherited across execve(2).
    


## RETURN VALUE



           On success, **PR_SVE_GET_VL** , return the nonnegative values described
           above.  On error, -1 is returned, and _errno_ is set to indicate the
           error.
    


## ERRORS



           **EINVAL** SVE is not available on this platform.
    


## STANDARDS



           Linux.  arm64 only.
    


## CAVEATS



           There is no way to determine whether there is a pending vector
           length change that has not yet taken effect.
    


* * *
# FS_IOC_SETFSLABEL

## NAME



           FS_IOC_GETFSLABEL, FS_IOC_SETFSLABEL - get or set a filesystem
           label
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/fs.h>  **/* Definition of ***FSLABEL*** constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, FS_IOC_GETFSLABEL, char** _label_**[FSLABEL_MAX]);**
           **int ioctl(int** _fd_**, FS_IOC_SETFSLABEL, char** _label_**[FSLABEL_MAX]);**
    


## DESCRIPTION



           If a filesystem supports online label manipulation, these ioctl(2)
           operations can be used to get or set the filesystem label for the
           filesystem on which _fd_ resides.  The **FS_IOC_SETFSLABEL** operation
           requires privilege (**CAP_SYS_ADMIN**).
    


## RETURN VALUE



           On success zero is returned.  On error, -1 is returned, and _errno_
           is set to indicate the error.
    


## ERRORS



           Possible errors include (but are not limited to) the following:
    
           **EFAULT** _label_ references an inaccessible memory area.
    
           **EINVAL** The specified label exceeds the maximum label length for
                  the filesystem.
    
           **ENOTTY** This can appear if the filesystem does not support online
                  label manipulation.
    
           **EPERM** The calling process does not have sufficient permissions to
                  set the label.
    


## STANDARDS



           Linux.
    


## NOTES



           The maximum string length for this interface is **FSLABEL_MAX** ,
           including the terminating null byte ('\0').  Filesystems have
           differing maximum label lengths, which may or may not include the
           terminating null.  The string provided to **FS_IOC_SETFSLABEL** must
           always be null-terminated, and the string returned by
           **FS_IOC_GETFSLABEL** will always be null-terminated.
    


* * *
# TIOCSLCKTRMIOS

## NAME



           TIOCGLCKTRMIOS, TIOCSLCKTRMIOS - locking the termios structre
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <asm/termbits.h>  **/* Definition of **TIOC*CLKTRMIOS** constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, TIOCGLCKTRMIOS, struct termios ***_argp_**);**
           **int ioctl(int** _fd_**, TIOCSLCKTRMIOS, const struct termios ***_argp_**);**
    
           **#include <asm/termbits.h>**
    
           **struct termios;**
    


## DESCRIPTION



           The _termios_ structure of a terminal can be locked.  The lock is
           itself a _termios_ structure, with nonzero bits or fields indicating
           a locked value.
    
           **TIOCGLCKTRMIOS**
                  Gets the locking status of the _termios_ structure of the
                  terminal.
    
           **TIOCSLCKTRMIOS**
                  Sets the locking status of the _termios_ structure of the
                  terminal.  Only a process with the **CAP_SYS_ADMIN** capability
                  can do this.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EPERM** Insufficient permission.
    


## CAVEATS



           Please note that **struct termios** from _< asm/termbits.h>_ is different
           and incompatible with **struct termios** from _< termios.h>_.  These
           ioctl calls require **struct termios** from _< asm/termbits.h>_.
    


* * *
# FIONREAD

## NAME



           FIONREAD, TIOCINQ, TIOCOUTQ, TCFLSH, TIOCSERGETLSR - buffer count
           and flushing
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <asm/termbits.h>  **/* Definition of constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, FIONREAD, int ***_argp_**);**
           **int ioctl(int** _fd_**, TIOCINQ, int ***_argp_**);**
           **int ioctl(int** _fd_**, TIOCOUTQ, int ***_argp_**);**
           **int ioctl(int** _fd_**, TCFLSH, int** _arg_**);**
           **int ioctl(int** _fd_**, TIOCSERGETLSR, int ***_argp_**);**
    


## DESCRIPTION



           **FIONREAD**
                  Get the number of bytes in the input buffer.
    
           **TIOCINQ**
                  Same as **FIONREAD**.
    
           **TIOCOUTQ**
                  Get the number of bytes in the output buffer.
    
           **TCFLSH** Equivalent to _tcflush(fd, arg)_.
    
                  See tcflush(3) for the argument values **TCIFLUSH** , **TCOFLUSH** ,
                  **TCIOFLUSH**.
    
           **TIOCSERGETLSR**
                  Get line status register.  Status register has **TIOCSER_TEMT**
                  bit set when output buffer is empty and also hardware
                  transmitter is physically empty.
    
                  Does not have to be supported by all serial tty drivers.
    
                  tcdrain(3) does not wait and returns immediately when
                  **TIOCSER_TEMT** bit is set.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


* * *
# UFFDIO_UNREGISTER

## NAME



           UFFDIO_UNREGISTER - unregister a memory address range from
           userfaultfd
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/userfaultfd.h>  **/* Definition of **UFFD*** constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, UFFDIO_UNREGISTER, const struct uffdio_range ***_argp_**);**
    


## DESCRIPTION



           Unregister a memory address range from userfaultfd.  The pages in
           the range must be “compatible” (see UFFDIO_REGISTER(2const)).
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EINVAL** Either _argp- >start_ or the _argp- >len_ fields was not a
                  multiple of the system page size; or the _argp- >len_ field
                  was zero; or these fields were otherwise invalid.
    
           **EINVAL** There as an incompatible mapping in the specified address
                  range.
    
           **EINVAL** There was no mapping in the specified address range.
    


## STANDARDS



           Linux.
    


## EXAMPLES



           See userfaultfd(2).
    


* * *
# FUTEX_FD

## NAME



           FUTEX_FD - create a file descriptor associated with a futex
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/futex.h>  **/* Definition of **FUTEX_*** constants */
           **#include <sys/syscall.h>  **/* Definition of **SYS_*** constants */
           **#include <unistd.h>**
    
           **[[deprecated]]**
           **long syscall(SYS_futex, uint32_t ***_uaddr_**, FUTEX_FD, uint32_t** _val_**);**
    


## DESCRIPTION



           This operation creates a file descriptor that is associated with
           the futex at _uaddr_.  The caller must close the returned file
           descriptor after use.
    
           When another process or thread performs a FUTEX_WAKE(2const) on
           the futex word, the file descriptor indicates as being readable
           with select(2), poll(2), and epoll(7)
    
           The file descriptor can be used to obtain asynchronous
           notifications: if _val_ is nonzero, then, when another process or
           thread executes a FUTEX_WAKE(2const), the caller will receive the
           signal number that was passed in _val_.
    


## RETURN VALUE



           On error, -1 is returned, and _errno_ is set to indicate the error.
    
           On success, **FUTEX_FD** Returns the new file descriptor associated
           with the futex.
    


## ERRORS



           See futex(2).
    
           **EINVAL** The signal number supplied in _val_ is invalid.
    
           **ENFILE** The system-wide limit on the total number of open files has
                  been reached.
    


## STANDARDS



           Linux.
    


* * *
# F_GETFL

## NAME



           F_GETFL, F_SETFL - get/set file status flags
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <fcntl.h>**
    
           **int fcntl(int** _fd_**, F_GETFL);**
           **int fcntl(int** _fd_**, F_SETFL, int** _arg_**);**
    


## DESCRIPTION



           Each open file description has certain associated status flags,
           initialized by open(2) and possibly modified by fcntl(2).
           Duplicated file descriptors (made with dup(2), F_DUPFD(2const),
           fork(2), etc.) refer to the same open file description, and thus
           share the same file status flags.
    
           The file status flags and their semantics are described in
           open(2).
    
           **F_GETFL**
                  Return (as the function result) the file access mode and
                  the file status flags; _arg_ is ignored.
    
           **F_SETFL**
                  Set the file status flags to the value specified by _arg_.
                  File access mode (**O_RDONLY** , **O_WRONLY** , **O_RDWR**) and file
                  creation flags (i.e., **O_CREAT** , **O_EXCL** , **O_NOCTTY** , **O_TRUNC**)
                  in _arg_ are ignored.  On Linux, this operation can change
                  only the **O_APPEND** , **O_ASYNC** , **O_DIRECT** , **O_NOATIME** , and
                  **O_NONBLOCK** flags.  It is not possible to change the **O_DSYNC**
                  and **O_SYNC** flags; see BUGS, below.
    


## RETURN VALUE



           **F_GETFL**
                  Value of file status flags.
    
           **F_SETFL**
                  Zero.
    
           On error, -1 is returned, and _errno_ is set to indicate the error.
    


## ERRORS



           See fcntl(2).
    
           **EPERM** Attempted to clear the **O_APPEND** flag on a file that has the
                  append-only attribute set.
    


## STANDARDS



           POSIX.1-2008.
    


## BUGS



       **F_SETFL**
           It is not possible to use **F_SETFL** to change the state of the
           **O_DSYNC** and **O_SYNC** flags.  Attempts to change the state of these
           flags are silently ignored.
    


* * *
# KEYCTL_INVALIDATE

## NAME



           KEYCTL_INVALIDATE - invalidate a key
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/keyctl.h>  **/* Definition of **KEY*** constants */
           **#include <sys/syscall.h>   **/* Definition of **SYS_*** constants */
           **#include <unistd.h>**
    
           **long syscall(SYS_keyctl, KEYCTL_INVALIDATE, key_serial_t** _key_**);**
    


## DESCRIPTION



           Mark a key as invalid.
    
           The ID of the key to be invalidated is specified in _key_.
    
           To invalidate a key, the caller must have _search_ permission on the
           key.
    
           This operation marks the key as invalid and schedules immediate
           garbage collection.  The garbage collector removes the invalidated
           key from all keyrings and deletes the key when its reference count
           reaches zero.  After this operation, the key will be ignored by
           all searches, even if it is not yet deleted.
    
           Keys that are marked invalid become invisible to normal key
           operations immediately, though they are still visible in
           _/proc/keys_ (marked with an 'i' flag) until they are actually
           removed.
    


## RETURN VALUE



           On success, 0 is returned.
    
           On error, -1 is returned, and _errno_ is set to indicate the error.
    


## VERSIONS



           A wrapper is provided in the _libkeyutils_ library:
           keyctl_invalidate(3).
    


## STANDARDS



           Linux.
    


* * *
# iopl

## NAME



           iopl - change I/O privilege level
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <sys/io.h>**
    
           **[[deprecated]] int iopl(int** _level_**);**
    


## DESCRIPTION



           **iopl**() changes the I/O privilege level of the calling thread, as
           specified by the two least significant bits in _level_.
    
           The I/O privilege level for a normal thread is 0.  Permissions are
           inherited from parents to children.
    
           This call is deprecated, is significantly slower than ioperm(2),
           and is only provided for older X servers which require access to
           all 65536 I/O ports.  It is mostly for the i386 architecture.  On
           many other architectures it does not exist or will always return
           an error.
    


## RETURN VALUE



           On success, zero is returned.  On error, -1 is returned, and _errno_
           is set to indicate the error.
    


## ERRORS



           **EINVAL** _level_ is greater than 3.
    
           **ENOSYS** This call is unimplemented.
    
           **EPERM** The calling thread has insufficient privilege to call
                  **iopl**(); the **CAP_SYS_RAWIO** capability is required to raise
                  the I/O privilege level above its current value.
    


## VERSIONS



           glibc2 has a prototype both in _< sys/io.h>_ and in _< sys/perm.h>_.
           Avoid the latter, it is available on i386 only.
    


## STANDARDS



           Linux.
    


* * *
# PR_SET_FPEMU

## NAME



           PR_SET_FPEMU - set floating-point emulation control bits
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_SET_FPEMU, long** _fpemu_**);**
    


## DESCRIPTION



           Set floating-point emulation control bits to _fpemu_.  Pass
           **PR_FPEMU_NOPRINT** to silently emulate floating-point operation
           accesses, or **PR_FPEMU_SIGFPE** to not emulate floating-point
           operations and send **SIGFPE** instead.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EINVAL** _fpemu_ is not a valid value.
    


## STANDARDS



           Linux.  ia64 only.
    


* * *
# TIOCSSOFTCAR

## NAME



           TIOCGSOFTCAR, TIOCSSOFTCAR - marking a line as local
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <asm/termbits.h>  **/* Definition of **TIOC*SOFTCAR** constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, TIOCGSOFTCAR, int ***_argp_**);**
           **int ioctl(int** _fd_**, TIOCSSOFTCAR, const int ***_argp_**);**
    


## DESCRIPTION



           **TIOCGSOFTCAR**
                  ("Get software carrier flag") Get the status of the CLOCAL
                  flag in the c_cflag field of the _termios_ structure.
    
           **TIOCSSOFTCAR**
                  ("Set software carrier flag") Set the CLOCAL flag in the
                  _termios_ structure when *_argp_ is nonzero, and clear it
                  otherwise.
    
           If the **CLOCAL** flag for a line is off, the hardware carrier detect
           (DCD) signal is significant, and an open(2) of the corresponding
           terminal will block until DCD is asserted, unless the **O_NONBLOCK**
           flag is given.  If **CLOCAL** is set, the line behaves as if DCD is
           always asserted.  The software carrier flag is usually turned on
           for local devices, and is off for lines with modems.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


* * *
# PR_GET_TSC

## NAME



           PR_GET_TSC - get wether the timestamp counter can be read
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_GET_TSC, int ***_flag_**);**
    


## DESCRIPTION



           Return the state of the flag determining whether the timestamp
           counter can be read, in the location pointed to by _flag_.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EFAULT** _arg2_ is an invalid address.
    


## STANDARDS



           Linux.  x86 only.
    


* * *
# wait4

## NAME



           wait3, wait4 - wait for process to change state, BSD style
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <sys/wait.h>**
    
           **pid_t wait3(int *_Nullable** _wstatus_**, int** _options_**,**
                       **struct rusage *_Nullable** _rusage_**);**
           **pid_t wait4(pid_t** _pid_**, int *_Nullable** _wstatus_**, int** _options_**,**
                       **struct rusage *_Nullable** _rusage_**);**
    
       Feature Test Macro Requirements for glibc (see
       feature_test_macros(7)):
    
           **wait3**():
               Since glibc 2.26:
                   _DEFAULT_SOURCE
                       || (_XOPEN_SOURCE >= 500 &&
                           ! (_POSIX_C_SOURCE >= 200112L
                              || _XOPEN_SOURCE >= 600))
               From glibc 2.19 to glibc 2.25:
                   _DEFAULT_SOURCE || _XOPEN_SOURCE >= 500
               glibc 2.19 and earlier:
                   _BSD_SOURCE || _XOPEN_SOURCE >= 500
    
           **wait4**():
               Since glibc 2.19:
                   _DEFAULT_SOURCE
               glibc 2.19 and earlier:
                   _BSD_SOURCE
    


## DESCRIPTION



           These functions are nonstandard; in new programs, the use of
           waitpid(2) or waitid(2) is preferable.
    
           The **wait3**() and **wait4**() system calls are similar to waitpid(2),
           but additionally return resource usage information about the child
           in the structure pointed to by _rusage_.
    
           Other than the use of the _rusage_ argument, the following **wait3**()
           call:
    
               wait3(wstatus, options, rusage);
    
           is equivalent to:
    
               waitpid(-1, wstatus, options);
    
           Similarly, the following **wait4**() call:
    
               wait4(pid, wstatus, options, rusage);
    
           is equivalent to:
    
               waitpid(pid, wstatus, options);
    
           In other words, **wait3**() waits of any child, while **wait4**() can be
           used to select a specific child, or children, on which to wait.
           See wait(2) for further details.
    
           If _rusage_ is not NULL, the _struct rusage_ to which it points will
           be filled with accounting information about the child.  See
           getrusage(2) for details.
    


## RETURN VALUE



           As for waitpid(2).
    


## ERRORS



           As for waitpid(2).
    


## STANDARDS



           None.
    


* * *
# PR_GET_PDEATHSIG

## NAME



           PR_GET_PDEATHSIG - get the parent-death signal number of the
           calling process
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_GET_PDEATHSIG, int ***_sig_**);**
    


## DESCRIPTION



           Return the parent-death signal number of the calling process, in
           the location pointed to by _sig_.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EFAULT** _sig_ is an invalid address.
    


## STANDARDS



           Linux.
    


* * *
# TIOCEXCL

## NAME



           TIOCEXCL, TIOCGEXCL, TIOCNXCL - exclusive mode
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <asm/termbits.h>  **/* Definition of **TIOC*XCL** constants */
           **#include <sys/ioctl.h>**
    
           **int ioctl(int** _fd_**, TIOCEXCL);**
           **int ioctl(int** _fd_**, TIOCGEXCL, int ***_argp_**);**
           **int ioctl(int** _fd_**, TIOCNXCL);**
    


## DESCRIPTION



           **TIOCEXCL**
                  Put the terminal into exclusive mode.  No further open(2)
                  operations on the terminal are permitted.  (They fail with
                  **EBUSY** , except for a process with the **CAP_SYS_ADMIN**
                  capability.)
    
           **TIOCGEXCL**
                  If the terminal is currently in exclusive mode, place a
                  nonzero value in the location pointed to by _argp_ ;
                  otherwise, place zero in _*argp_.
    
           **TIOCNXCL**
                  Disable exclusive mode.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


* * *
# ioctl_xfs_fscounts

## NAME



           ioctl_xfs_fscounts - query XFS summary counter information
    


## SYNOPSIS



           **#include <xfs/xfs_fs.h>**
    
           **int ioctl(int** _fd_**, XFS_IOC_FSCOUNTS, struct xfs_fsop_counts ***_arg_**);**
    


## DESCRIPTION



           Query the raw filesystem summary counters.  Unlike statvfs(3), the
           values returned here are the raw values, which do not reflect any
           alterations or limits set by project quotas.  The counter
           information is conveyed in a structure of the following form:
    
               struct xfs_fsop_counts {
                    __u64   freedata;
                    __u64   freertx;
                    __u64   freeino;
                    __u64   allocino;
               };
    
           The fields of this structure are as follows:
    
           _freedata_ is the number of free filesystem blocks on the data
           device.
    
           _freertx_ is the number of free extents on the realtime device.
    
           _freeino_ is the number of inode records that are not in use within
           the space that has been allocated for them.
    
           _allocino_ is the number of inode records for which space has been
           allocated.
    


## RETURN VALUE



           On error, -1 is returned, and _errno_ is set to indicate the error.
    


## ERRORS



           Error codes can be one of, but are not limited to, the following:
    
           **EFSBADCRC**
                  Metadata checksum validation failed while performing the
                  query.
    
           **EFSCORRUPTED**
                  Metadata corruption was encountered while performing the
                  query.
    
           **EINVAL** The specified allocation group number is not valid for this
                  filesystem.
    
           **EIO** An I/O error was encountered while performing the query.
    


## CONFORMING TO



           This API is specific to XFS filesystem on the Linux kernel.
    


* * *
# PR_SET_SPECULATION_CTRL

## NAME



           PR_SET_SPECULATION_CTRL - set the state of a speculation
           misfeature for the calling thread
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_SET_SPECULATION_CTRL, long** _misfeature_**, long** _val_**, 0L, 0L);**
    


## DESCRIPTION



           Sets the state of the speculation misfeature specified in
           _misfeature_.  The speculation-misfeature settings are per-thread
           attributes.
    
           Currently, _misfeature_ must be one of:
    
           **PR_SPEC_STORE_BYPASS**
                  Set the state of the speculative store bypass misfeature.
    
           **PR_SPEC_INDIRECT_BRANCH**(since Linux 4.20)
                  Set the state of the indirect branch speculation
                  misfeature.
    
           The _val_ argument is used to hand in the control value, which is
           one of the following:
    
           **PR_SPEC_ENABLE**
                  The speculation feature is enabled, mitigation is disabled.
    
           **PR_SPEC_DISABLE**
                  The speculation feature is disabled, mitigation is enabled.
    
           **PR_SPEC_FORCE_DISABLE**
                  Same as **PR_SPEC_DISABLE** , but cannot be undone.
    
           **PR_SPEC_DISABLE_NOEXEC**(since Linux 5.1)
                  Same as **PR_SPEC_DISABLE** , but the state will be cleared on
                  execve(2).  Currently only supported for
                  **PR_SPEC_STORE_BYPASS**.
    
           The speculation feature can also be controlled by the
           **spec_store_bypass_disable** boot parameter.  This parameter may
           enforce a read-only policy which will result in the **prctl**() call
           failing with the error **ENXIO**.  For further details, see the kernel
           source file _Documentation/admin-guide/kernel-parameters.txt_.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **ENODEV** The kernel or CPU does not support the requested
                  speculation _misfeature_.
    
           **ENXIO** The control of the selected speculation misfeature is not
                  possible.  See **PR_GET_SPECULATION_CTRL** for the bit fields
                  to determine which option is available.
    
           **EPERM** The speculation was disabled with **PR_SPEC_FORCE_DISABLE** and
                  caller tried to enable it again.
    
           **ERANGE** _misfeature_ is not a valid value.
    


## STANDARDS



           Linux.
    


* * *
# PR_SET_PDEATHSIG

## NAME



           PR_SET_PDEATHSIG - set the parent-death signal of the calling
           process
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_SET_PDEATHSIG, long** _sig_**);**
    


## DESCRIPTION



           Set the parent-death signal of the calling process to _sig_ (either
           a signal value in the range [**1** , _NSIG - 1_], or **0** to clear).  This
           is the signal that the calling process will get when its parent
           dies.
    
           The parent-death signal is sent upon subsequent termination of the
           parent thread and also upon termination of each subreaper process
           (see PR_SET_CHILD_SUBREAPER(2const)) to which the caller is
           subsequently reparented.  If the parent thread and all ancestor
           subreapers have already terminated by the time of the
           **PR_SET_PDEATHSIG** operation, then no parent-death signal is sent to
           the caller.
    
           The parent-death signal is process-directed (see signal(7)) and,
           if the child installs a handler using the sigaction(2) **SA_SIGINFO**
           flag, the _si_pid_ field of the _siginfo_t_ argument of the handler
           contains the PID of the terminating parent process.
    
           The parent-death signal setting is cleared for the child of a
           fork(2).  It is also (since Linux 2.4.36 / 2.6.23) cleared when
           executing a set-user-ID or set-group-ID binary, or a binary that
           has associated capabilities (see capabilities(7)); otherwise, this
           value is preserved across execve(2).  The parent-death signal
           setting is also cleared upon changes to any of the following
           thread credentials: effective user ID, effective group ID,
           filesystem user ID, or filesystem group ID.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## ERRORS



           **EINVAL** _sig_ is not a valid signal number.
    


## STANDARDS



           Linux.
    


## CAVEATS



           The "parent" in this case is considered to be the _thread_ that
           created this process.  In other words, the signal will be sent
           when that thread terminates (via, for example, pthread_exit(3)),
           rather than after all of the threads in the parent process
           terminate.
    


* * *
# PR_CAP_AMBIENT_CLEAR_ALL

## NAME



           PR_CAP_AMBIENT_CLEAR_ALL - clear the ambient capability set of the
           calling thread
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0L, 0L, 0L);**
    


## DESCRIPTION



           All capabilities will be removed from the ambient capability set.
    


## RETURN VALUE



           On success, 0 is returned.  On error, -1 is returned, and _errno_ is
           set to indicate the error.
    


## VERSIONS



           See PR_CAP_AMBIENT(2const).
    


## STANDARDS



           Linux.
    


* * *
# PR_GET_DUMPABLE

## NAME



           PR_GET_DUMPABLE - get the "dumpable" attribute of the calling
           process
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <linux/prctl.h>  **/* Definition of **PR_*** constants */
           **#include <sys/prctl.h>**
    
           **int prctl(PR_GET_DUMPABLE);**
    


## DESCRIPTION



           Return the current state of the calling process's "dumpable"
           attribute.  See PR_SET_DUMPABLE(2const).
    


## RETURN VALUE



           On success, return the value described above.  On error, -1 is
           returned, and _errno_ is set to indicate the error.
    


## STANDARDS



           Linux.
    


* * *