Flags used by waitid(2) system call.
exited = WEXITEDstopped = WSTOPPEDresumed = WCONTINUEDnon_blocking = WNOHANGfile_descriptors = CLONE_FILESfile_system = CLONE_FScontrol_groups = CLONE_NEWCGROUPipc = CLONE_NEWIPCnetwork = CLONE_NEWNETmount_points = CLONE_NEWNSprocesses = CLONE_NEWPIDusers = CLONE_NEWUSERhostname = CLONE_NEWUTSipc_sysv = CLONE_SYSVSEMany = 0control_groups = CLONE_NEWCGROUPipc = CLONE_NEWIPCnetwork = CLONE_NEWNETmount_points = CLONE_NEWNSprocesses = CLONE_NEWPIDusers = CLONE_NEWUSERhostname = CLONE_NEWUTSFlags used by clone(2) system call.
fork = 0signal_parent = SIGCHLDwait_for_exec = CLONE_VFORKnew_process_namespace = CLONE_NEWPIDshare_memory = CLONE_VMshare_signal_handlesr = CLONE_SIGHANDshare_ipc_sysv = CLONE_SYSVSEMshare_file_descriptors = CLONE_FILESshare_file_system = CLONE_FSunshare_control_groups = CLONE_NEWCGROUPunshare_ipc = CLONE_NEWIPCunshare_network = CLONE_NEWNETunshare_mount_points = CLONE_NEWNSunshare_processes = CLONE_NEWPIDunshare_users = CLONE_NEWUSERunshare_hostname = CLONE_NEWUTSSystem process with std::thread interface.
public sys::process_viewusing flags = process_flagusing stack_ptr = std::unique_ptr< char[]>wait(wait_flags flags = wait_flags::exited) -> sys::process_status
Wait until process changes its state or terminates.
std::errc::interrupted
swap(process & rhs) -> void
Swap with rhs.
operator=(process && rhs) -> process &Move-assignment.
~process()Terminates the process, if any.
process(process && rhs)Move-constructor.
process(const process &)process()process(pid_type rhs)explicitConstruct process by its ID.
template <class F> process(F && f, process_flag flags = process_flag::fork, size_t stack_size = 4096 *8)explicit
Construct new process by forking a child with f as main function.
Process context to be used for user-space context switching.
private ucontext_toperator=(user_context &&) -> user_context &user_context(user_context &&)operator=(const user_context &) -> user_context &user_context(const user_context &)~user_context()user_context()swap(const user_context & other) -> voidrestore() const -> voidsave() -> voidlink(user_context & parent) -> voidstack(size_t n) -> voidtemplate <class Function, class ... Args> make(Function func, int argc, Args &&... argv) -> voidpid_type _piddo_kill(sys::signal sig) const -> intprotectedcpu_affinity(const static_cpu_set & mask) -> voidcpus(const dynamic_cpu_set & mask) -> voidcpu_affinity() const -> static_cpu_setcpus() const -> dynamic_cpu_setscheduling_parameters(const scheduling_policy_parameter & params) -> voidscheduling_parameters() const -> scheduling_policy_parameterscheduling_policy(scheduling_policies value, const scheduling_policy_parameter & param) -> voidscheduling_policy() const -> scheduling_policiespriority() -> intpriority(int value) -> voidinit_user_namespace() -> voidget_namespace(const char * proc_suffix) -> fildesjoin() -> void
Wait until process changes its state or terminates.
std::errc::interrupted
joinable() const -> boolAlways returns true to be compatible with std::thread.
operator!() const -> boolCheck if process is not alive by sending nought signal to it.
operator bool() constexplicitCheck if process is alive by sending nought signal to it.
wait(wait_flags flags = wait_flags::exited) -> sys::process_status
Wait until process changes its state or terminates.
std::errc::interrupted
group_id(pid_type rhs) const -> voidSet process group ID.
group_id() const -> pid_typeGet process group ID.
id() const -> pid_typeGet process ID.
send(sys::signal s) -> void
Send signal s to the process.
resume() -> voidInterrupt the process by sending signal::resume signal.
stop() -> voidInterrupt the process by sending signal::stop signal.
hang_up() -> voidInterrupt the process by sending signal::hang_up signal.
interrupt() -> voidInterrupt the process by sending signal::keyboard_interrupt signal.
kill() -> voidForcibly terminate the process by sending signal::kill signal.
terminate() -> voidGracefully terminate the process by sending signal::terminate signal.
operator=(process_view &&) -> process_view &process_view(process_view &&)operator=(const process_view &) -> process_view &process_view(const process_view &)~process_view()process_view()process_view(pid_type pid)explicitSet current process' working directory.
fork() -> pid_typeFork child process preventing race conditions by locking global fork mutex (if needed). The mutex is not locked on systems supporting close-on-exec and non-blocking file descriptor flags.
id() -> pid_typeGet calling process ID.
parent_id() -> pid_typeGet calling process' parent ID.
hostname(const_string name) -> voidcpu_affinity(const static_cpu_set & mask) -> voidcpus(const dynamic_cpu_set & mask) -> voidoperator<<(std::ostream & out, const process & rhs) -> std::ostream &Output process ID and process group ID.
get_namespace(const char * proc_suffix) -> fildesenter(fd_type fd, namespace_type ns = namespace_type::any) -> voiduser_priority(uid_type user, int value) -> voidcpus() -> dynamic_cpu_setGet calling process name.
user_priority(uid_type uid) -> intgroup_id() -> pid_typeGet process group ID of the calling process.
cpu_affinity() -> static_cpu_setSet calling process name. Useful for debugging multi-threaded programmes.
enable_process_accounting(c_string path) -> void