RDoc for module Process (#8141)

This commit is contained in:
Burdette Lamar 2023-07-31 20:44:56 -05:00 committed by GitHub
parent 0b8045c9c9
commit 533dcb8e52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-08-01 01:45:17 +00:00
Merged-By: peterzhu2118 <peter@peterzhu.ca>

View File

@ -8569,19 +8569,87 @@ proc_warmup(VALUE _)
/* /*
* Document-module: Process * Document-module: Process
* *
* The module contains several groups of functionality for handling OS processes: * \Module +Process+ represents a process in the underlying operating system.
* Its methods support management of the current process and its child processes.
*
* == What's Here
*
* === Current-Process Getters
*
* - ::argv0: Returns the process name as a frozen string.
* - ::egid: Returns the effective group ID.
* - ::euid: Returns the effective user ID.
* - ::getpgrp: Return the process group ID.
* - ::getrlimit: Returns the resource limit.
* - ::gid: Returns the (real) group ID.
* - ::pid: Returns the process ID.
* - ::ppid: Returns the process ID of the parent process.
* - ::uid: Returns the (real) user ID.
*
* === Current-Process Setters
*
* - ::egid=: Sets the effective group ID.
* - ::euid=: Sets the effective user ID.
* - ::gid=: Sets the (real) group ID.
* - ::setproctitle: Sets the process title.
* - ::setpgrp: Sets the process group ID of the process to zero.
* - ::setrlimit: Sets a resource limit.
* - ::setsid: Establishes the process as a new session and process group leader,
* with no controlling tty.
* - ::uid=: Sets the user ID.
*
* === Current-Process Execution
*
* - ::abort: Immediately terminates the process.
* - ::daemon: Detaches the process from its controlling terminal
* and continues running it in the background as system daemon.
* - ::exec: Replaces the process by running a given external command.
* - ::exit: Initiates process termination by raising exception SystemExit
* (which may be caught).
* - ::exit!: Immediately exits the process.
* - ::warmup: Notifies the Ruby virtual machine that the boot sequence
* for the application is completed,
* and that the VM may begin optimizing the application.
*
* === Child Processes
*
* - ::detach: Guards against a child process becoming a zombie.
* - ::fork: Creates a child process.
* - ::kill: Sends a given signal to processes.
* - ::spawn: Creates a child process.
* - ::wait, ::waitpid: Waits for a child process to exit; returns its process ID.
* - ::wait2, ::waitpid2: Waits for a child process to exit; returns its process ID and status.
* - ::waitall: Waits for all child processes to exit;
* returns their process IDs and statuses.
*
* === \Process Groups
*
* - ::getpgid: Returns the process group ID for a process.
* - ::getpriority: Returns the scheduling priority
* for a process, process group, or user.
* - ::getsid: Returns the session ID for a process.
* - ::groups: Returns an array of the group IDs
* in the supplemental group access list for this process.
* - ::groups=: Sets the supplemental group access list
* to the given array of group IDs.
* - ::initgroups: Initializes the supplemental group access list.
* - ::last_status: Returns the status of the last executed child process
* in the current thread.
* - ::maxgroups: Returns the maximum number of group IDs allowed
* in the supplemental group access list.
* - ::maxgroups=: Sets the maximum number of group IDs allowed
* in the supplemental group access list.
* - ::setpgid: Sets the process group ID of a process.
* - ::setpriority: Sets the scheduling priority
* for a process, process group, or user.
*
* === Timing
*
* - ::clock_getres: Returns the resolution of a system clock.
* - ::clock_gettime: Returns the time from a system clock.
* - ::times: Returns a Process::Tms object containing times
* for the current process and its child processes.
* *
* * Low-level property introspection and management of the current process, like
* Process.argv0, Process.pid;
* * Low-level introspection of other processes, like Process.getpgid, Process.getpriority;
* * Management of the current process: Process.abort, Process.exit, Process.daemon, etc.
* (for convenience, most of those are also available as global functions
* and module functions of Kernel);
* * Creation and management of child processes: Process.fork, Process.spawn, and
* related methods;
* * Management of low-level system clock: Process.times and Process.clock_gettime,
* which could be important for proper benchmarking and other elapsed
* time measurement tasks.
*/ */
void void