Module lrs::process

Process handling.

Sub-modules

NameDescription
clone
res_user
resource

Types

KindNameDescription
Enum ChildStatus

The status of a child process.

Struct CloneFlags

Flags that can be used when cloning a process.

Typedef ProcessId
Struct Resource
Struct ResourceUsage

Resource usage.

Struct ResourceUser
Struct Times

The times used by a process and its children.

Struct WaitFlags

Flags used for waiting for child processes.

Functions

NameDescription
exec

Executes a program in place of the current program.

exit

Exits the process.

fork

Forks the process and executes a function in the child process.

new_session

Creates a new session.

parent_process_id

Returns the process id of the parent process.

process_group

Get the process group of this or another process.

process_id

Returns the process id of this process.

resource_limit

Returns a resource limit.

resource_usage

Returns the resource usage of this thread, this process, or its children.

session

Get the session id of this or another process.

set_file_mask

Sets the file mode creation mask of the process.

set_process_group

Sets the process group of this or another process.

set_resource_limit

Sets a resource limit.

used_time

Returns the CPU times used by this process and its children.

wait_all

Wait for all child processes.

wait_id

Wait for a certain child process.

Constants

NameDescription
WAIT_CONTINUED

Wait for the child to continue.

WAIT_DONT_BLOCK

Don't block if the status change to wait for has not occurred.

WAIT_DONT_REAP

Don't reap the child process.

WAIT_EXITED

Wait for the child to exit.

WAIT_STOPPED

Wait for the child to stop.