Skip to content

Commit

Permalink
RDoc for module Process (#8141)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurdetteLamar committed Aug 1, 2023
1 parent 0b8045c commit 533dcb8
Showing 1 changed file with 81 additions and 13 deletions.
94 changes: 81 additions & 13 deletions process.c
Expand Up @@ -8569,19 +8569,87 @@ proc_warmup(VALUE _)
/*
* Document-module: Process
*
* The module contains several groups of functionality for handling OS 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.
* \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.
*
*/

void
Expand Down

0 comments on commit 533dcb8

Please sign in to comment.