UNISTDX_IPC_PROCESS
using scheduling_policy_parameter = ::sched_param
using id_type = ::id_t
enum wait_flags: int

Flags used by waitid(2) system call.

  • exited = WEXITED
  • stopped = WSTOPPED
  • resumed = WCONTINUED
  • non_blocking = WNOHANG
enum unshare_flag: int
  • file_descriptors = CLONE_FILES
  • file_system = CLONE_FS
  • control_groups = CLONE_NEWCGROUP
  • ipc = CLONE_NEWIPC
  • network = CLONE_NEWNET
  • mount_points = CLONE_NEWNS
  • processes = CLONE_NEWPID
  • users = CLONE_NEWUSER
  • hostname = CLONE_NEWUTS
  • ipc_sysv = CLONE_SYSVSEM
enum namespace_type
  • any = 0
  • control_groups = CLONE_NEWCGROUP
  • ipc = CLONE_NEWIPC
  • network = CLONE_NEWNET
  • mount_points = CLONE_NEWNS
  • processes = CLONE_NEWPID
  • users = CLONE_NEWUSER
  • hostname = CLONE_NEWUTS
enum process_flag: int

Flags used by clone(2) system call.

  • fork = 0
  • signal_parent = SIGCHLD
  • wait_for_exec = CLONE_VFORK
  • new_process_namespace = CLONE_NEWPID
  • share_memory = CLONE_VM
  • share_signal_handlesr = CLONE_SIGHAND
  • share_ipc_sysv = CLONE_SYSVSEM
  • share_file_descriptors = CLONE_FILES
  • share_file_system = CLONE_FS
  • unshare_control_groups = CLONE_NEWCGROUP
  • unshare_ipc = CLONE_NEWIPC
  • unshare_network = CLONE_NEWNET
  • unshare_mount_points = CLONE_NEWNS
  • unshare_processes = CLONE_NEWPID
  • unshare_users = CLONE_NEWUSER
  • unshare_hostname = CLONE_NEWUTS
enum scheduling_policies
    class sys::process

    System process with std::thread interface.

    Base classes
    Types
    • using flags = process_flag
    • using stack_ptr = std::unique_ptr< char[]>
    Methods
    class sys::user_context

    Process context to be used for user-space context switching.

    Base classes
    • private ucontext_t
    Types
    • using function_type = void(*)()
    Methods
    class sys::process_view
    Derived classes
    Fields
    Methods
    struct sys::is_flag< process_flag >
    Base classes
    • public std::true_type
    struct sys::is_flag< unshare_flag >
    Base classes
    • public std::true_type
    struct sys::is_flag< wait_flags >
    Base classes
    • public std::true_type
    unshare(unshare_flag flags) -> void
    workdir(const char * wd) -> void

    Set current process' working directory.

    bad_call

    yield() -> void
    process_group_priority(id_type pgrp, int value) -> void
    pause() -> std::errc
    fork() -> pid_type

    Fork child process preventing race conditions by locking global fork mutex (if needed).

    bad_call

    The mutex is not locked on systems supporting close-on-exec and non-blocking file descriptor flags.

    min_priority(scheduling_policies policy) -> int
    id() -> pid_type

    Get calling process ID.

    disable_process_accounting() -> void
    parent_id() -> pid_type

    Get calling process' parent ID.

    hostname(const_string name) -> void
    cpu_affinity(const static_cpu_set & mask) -> void
    root(const char * new_root) -> void
    swap(process & lhs, process & rhs) -> void

    Overload of std::swap for process.

    cpus(const dynamic_cpu_set & mask) -> void
    priority() -> int
    operator<<(std::ostream & out, const process & rhs) -> std::ostream &

    Output process ID and process group ID.

    max_priority(scheduling_policies policy) -> int
    get_namespace(const char * proc_suffix) -> fildes
    enter(fd_type fd, namespace_type ns = namespace_type::any) -> void
    user_priority(uid_type user, int value) -> void
    send(signal s, pid_type p) -> UNISTDX_DEPRECATED void

    Send signal s to process p.

    bad_call

    scheduling_parameters() -> scheduling_policy_parameter
    user_priority() -> int
    group_id(pid_type rhs) -> void

    Set calling process group ID.

    bad_call

    cpus() -> dynamic_cpu_set
    scheduling_parameters(const scheduling_policy_parameter & params) -> void
    name() -> std::string

    Get calling process name.

    bad_call

    user_priority(uid_type uid) -> int
    group_id() -> pid_type

    Get process group ID of the calling process.

    cpu_affinity() -> static_cpu_set
    process_group_priority(id_type pgrp) -> int
    send(signal s) -> void

    Send signal s to the current process.

    bad_call

    hostname() -> std::string
    name(const char * name) -> void

    Set calling process name. Useful for debugging multi-threaded programmes.

    bad_call

    priority(int value) -> void
    scheduling_policy(scheduling_policies value, const scheduling_policy_parameter & param) -> void
    exit(int status) -> void
    scheduling_policy() -> scheduling_policies
    enable_process_accounting(c_string path) -> void