Skip to content

doc: fix the order of the process API doc #58403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 51 additions & 51 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,28 @@
'customArgv0'
```

## `process.availableMemory()`

<!-- YAML
added:
- v22.0.0
- v20.13.0
changes:
- version:
- v24.0.0
- v22.16.0
pr-url: https://github.com/nodejs/node/pull/57765

Check warning on line 995 in doc/api/process.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: Change stability index for this feature from Experimental to Stable.
-->

* {number}

Gets the amount of free memory that is still available to the process
(in bytes).

See [`uv_get_available_memory`][uv_get_available_memory] for more
information.

## `process.channel`

<!-- YAML
Expand Down Expand Up @@ -1157,28 +1179,6 @@
See [`uv_get_constrained_memory`][uv_get_constrained_memory] for more
information.

## `process.availableMemory()`

<!-- YAML
added:
- v22.0.0
- v20.13.0
changes:
- version:
- v24.0.0
- v22.16.0
pr-url: https://github.com/nodejs/node/pull/57765
description: Change stability index for this feature from Experimental to Stable.
-->

* {number}

Gets the amount of free memory that is still available to the process
(in bytes).

See [`uv_get_available_memory`][uv_get_available_memory] for more
information.

## `process.cpuUsage([previousValue])`

<!-- YAML
Expand Down Expand Up @@ -1780,6 +1780,35 @@
'/usr/local/bin/node'
```

## `process.execve(file[, args[, env]])`

<!-- YAML
added:
- v23.11.0
- v22.15.0
-->

> Stability: 1 - Experimental

* `file` {string} The name or path of the executable file to run.
* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`).
* `env` {Object} Environment key-value pairs.
No key or value can contain a null-byte (`\u0000`).
**Default:** `process.env`.

Replaces the current process with a new process.

This is achieved by using the `execve` POSIX function and therefore no memory or other
resources from the current process are preserved, except for the standard input,
standard output and standard error file descriptor.

All other resources are discarded by the system when the processes are swapped, without triggering
any exit or close events and without running any cleanup handler.

This function will never return, unless an error occurred.

This function is not available on Windows or IBM i.

## `process.exit([code])`

<!-- YAML
Expand Down Expand Up @@ -3360,35 +3389,6 @@
`name` property may be present. The additional properties should not be
relied upon to exist.

## `process.execve(file[, args[, env]])`

<!-- YAML
added:
- v23.11.0
- v22.15.0
-->

> Stability: 1 - Experimental

* `file` {string} The name or path of the executable file to run.
* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`).
* `env` {Object} Environment key-value pairs.
No key or value can contain a null-byte (`\u0000`).
**Default:** `process.env`.

Replaces the current process with a new process.

This is achieved by using the `execve` POSIX function and therefore no memory or other
resources from the current process are preserved, except for the standard input,
standard output and standard error file descriptor.

All other resources are discarded by the system when the processes are swapped, without triggering
any exit or close events and without running any cleanup handler.

This function will never return, unless an error occurred.

This function is not available on Windows or IBM i.

## `process.report`

<!-- YAML
Expand Down
Loading