From 4367c5ad9e44ec6f4464cdd7a08a0e447203d21b Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 6 Feb 2024 15:54:36 -0800 Subject: [PATCH] docs: Properly document runAsNode utility process option (#41255) * docs: Properly document runAsNode utility process option * Update docs/api/utility-process.md Co-authored-by: Charles Kerr --------- Co-authored-by: Charles Kerr --- docs/api/utility-process.md | 7 +++---- docs/tutorial/fuses.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/api/utility-process.md b/docs/api/utility-process.md index 7c19dd1be98..f628f4164d0 100644 --- a/docs/api/utility-process.md +++ b/docs/api/utility-process.md @@ -21,12 +21,11 @@ Process: [Main](../glossary.md#main-process)
of the child process. Default is `inherit`. String value can be one of `pipe`, `ignore`, `inherit`, for more details on these values you can refer to [stdio][] documentation from Node.js. Currently this option only supports configuring `stdout` and - `stderr` to either `pipe`, `inherit` or `ignore`. Configuring `stdin` is not supported; `stdin` will - always be ignored. + `stderr` to either `pipe`, `inherit` or `ignore`. Configuring `stdin` to any property other than `ignore` is not supported and will result in an error. For example, the supported values will be processed as following: - * `pipe`: equivalent to \['ignore', 'pipe', 'pipe'] (the default) + * `pipe`: equivalent to \['ignore', 'pipe', 'pipe'] * `ignore`: equivalent to \['ignore', 'ignore', 'ignore'] - * `inherit`: equivalent to \['ignore', 'inherit', 'inherit'] + * `inherit`: equivalent to \['ignore', 'inherit', 'inherit'] (the default) * `serviceName` string (optional) - Name of the process that will appear in `name` property of [`ProcessMetric`](structures/process-metric.md) returned by [`app.getAppMetrics`](app.md#appgetappmetrics) and [`child-process-gone` event of `app`](app.md#event-child-process-gone). diff --git a/docs/tutorial/fuses.md b/docs/tutorial/fuses.md index 4269b2bf360..de027fe3662 100644 --- a/docs/tutorial/fuses.md +++ b/docs/tutorial/fuses.md @@ -15,7 +15,7 @@ Fuses are the solution to this problem, at a high level they are "magic bits" in **Default:** Enabled **@electron/fuses:** `FuseV1Options.RunAsNode` -The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. +The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. Instead, we recommend that you use [Utility Processes](../api/utility-process.md), which work for many use cases where you need a standalone Node.js process (like a Sqlite server process or similar scenarios). ### `cookieEncryption`