From f96c76584f21626a2eb054ef844444f16e744590 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 26 Aug 2015 17:27:17 -0700 Subject: [PATCH 01/10] First run at ipc-m-p edits --- docs/api/ipc-main-process.md | 52 ++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/docs/api/ipc-main-process.md b/docs/api/ipc-main-process.md index d558f7fb24d6..b29d56f6ba37 100644 --- a/docs/api/ipc-main-process.md +++ b/docs/api/ipc-main-process.md @@ -1,17 +1,19 @@ # ipc (main process) -Handles asynchronous and synchronous message sent from a renderer process (web -page). +The `ipc` module, when used in the main process, handles asynchronous and synchronous messages sent from a renderer process (web page). Messages sent from a renderer will be emitted to this module. -The messages sent from a renderer would be emitted to this module, the event name -is the `channel` when sending message. To reply a synchronous message, you need -to set `event.returnValue`, to send an asynchronous back to the sender, you can -use `event.sender.send(...)`. +## Sending Messages -It's also possible to send messages from main process to the renderer process, -see [WebContents.send](browser-window.md#webcontentssendchannel-args) for more. +It is also possible to send messages from the main process to the renderer +process, see [WebContents.send](browser-window.md#webcontentssendchannel-args) +for more information. -An example of sending and handling messages: +- When sending a message, the event name is the `channel`. +- To reply a synchronous message, you need to set `event.returnValue`. +- To send an asynchronous back to the sender, you can use `event.sender.send(...)`. + +An example of sending and handling messages between the render and main +processes: ```javascript // In main process. @@ -38,12 +40,34 @@ ipc.on('asynchronous-reply', function(arg) { ipc.send('asynchronous-message', 'ping'); ``` -## Class: Event +## Methods -### Event.returnValue +The `ipc` module has the following method: -Assign to this to return an value to synchronous messages. +### `ipc.on(channel, callback)` -### Event.sender +* `channel` String - The event name. +* `callback` Function -The `WebContents` that sent the message. +When the event occurs the `callback` is called with an `event` object and a +message, `arg`. + +## IPC Events + +The `event` object passed to the `callback` has the following methods: + +### `Event.returnValue` + +Set this to the value to be returned in a synchronous message. + +### `Event.sender` + +Returns the `WebContents` that sent the message. + +### `Event.sender.send(channel, arg)` + +* `channel` String - The event name. +* `arg` + +This sends an asynchronous message back to the render process. The message, +`arg`, can be any value. From a34a16653eb50529c42d92933ba94cca0b3b6e0f Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 26 Aug 2015 17:32:47 -0700 Subject: [PATCH 02/10] Standardize global-shortcut --- docs/api/global-shortcut.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index 54da5638d194..52ec17326c63 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -1,9 +1,12 @@ # global-shortcut The `global-shortcut` module can register/unregister a global keyboard shortcut -with the operating system, so that you can customize the operations for various shortcuts. -Note that the shortcut is global; it will work even if the app does not have the keyboard focus. -You should not use this module until the `ready` event of the app module is emitted. +with the operating system so that you can customize the operations for various +shortcuts. + +Note that the shortcut is global; it will work even if the app does +not have the keyboard focus. You should not use this module until the `ready` +event of the app module is emitted. ```javascript var app = require('app'); @@ -32,7 +35,11 @@ app.on('will-quit', function() { }); ``` -## globalShortcut.register(accelerator, callback) +## Methods + +The `global-shortcut` module has the following methods: + +### `globalShortcut.register(accelerator, callback)` * `accelerator` [Accelerator](accelerator.md) * `callback` Function @@ -40,18 +47,18 @@ app.on('will-quit', function() { Registers a global shortcut of `accelerator`. The `callback` is called when the registered shortcut is pressed by the user. -## globalShortcut.isRegistered(accelerator) +### `globalShortcut.isRegistered(accelerator)` * `accelerator` [Accelerator](accelerator.md) Returns `true` or `false` depending on whether the shortcut `accelerator` is registered. -## globalShortcut.unregister(accelerator) +### `globalShortcut.unregister(accelerator)` * `accelerator` [Accelerator](accelerator.md) -Unregisters the global shortcut of `keycode`. +Unregisters the global shortcut of `accelerator`. -## globalShortcut.unregisterAll() +### `globalShortcut.unregisterAll()` Unregisters all the global shortcuts. From 71f46c02877fd1d42b5e6de195572ab2727d2503 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 26 Aug 2015 17:52:45 -0700 Subject: [PATCH 03/10] =?UTF-8?q?arg=20=E2=86=92=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/ipc-main-process.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/api/ipc-main-process.md b/docs/api/ipc-main-process.md index b29d56f6ba37..197b98e418be 100644 --- a/docs/api/ipc-main-process.md +++ b/docs/api/ipc-main-process.md @@ -64,10 +64,9 @@ Set this to the value to be returned in a synchronous message. Returns the `WebContents` that sent the message. -### `Event.sender.send(channel, arg)` +### `Event.sender.send(channel[, message])` * `channel` String - The event name. -* `arg` +* `message` (optional) -This sends an asynchronous message back to the render process. The message, -`arg`, can be any value. +This sends an asynchronous message back to the render process. The `message` can be any value. From a1f17069ec3a742bc83697c4bbf4c73a1a669834 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 26 Aug 2015 17:56:10 -0700 Subject: [PATCH 04/10] First run t ipc-r --- docs/api/ipc-renderer.md | 44 +++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index 3aee11d781c9..0d7b49aba701 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -1,29 +1,41 @@ # ipc (renderer) The `ipc` module provides a few methods so you can send synchronous and -asynchronous messages to the main process, and also receive messages sent from -main process. If you want to make use of modules of main process from renderer +asynchronous messages from the render process (web page) to the main process. You can also receive messages returned from the main process. + +**Note**: If you want to make use of modules in the main process from the renderer process, you might consider using the [remote](remote.md) module. -See [ipc (main process)](ipc-main-process.md) for examples. +See [ipc (main process)](ipc-main-process.md) for code examples. -## ipc.send(channel[, args...]) +## Methods -Send `args..` to the renderer via `channel` in asynchronous message, the main -process can handle it by listening to the `channel` event of `ipc` module. +The `ipc` module has the following methods for sending messages: -## ipc.sendSync(channel[, args...]) +**Note**: When using these methods to send a `message` you must also listen for it in the main process with [`ipc (main process)`](ipc-main-process.md). -Send `args..` to the renderer via `channel` in synchronous message, and returns -the result sent from main process. The main process can handle it by listening to -the `channel` event of `ipc` module, and returns by setting `event.returnValue`. +### `ipc.send(channel[, message])` -**Note:** Usually developers should never use this API, since sending -synchronous message would block the whole renderer process. +* `channel` String - The event name. +* `message` (optional) -## ipc.sendToHost(channel[, args...]) +Send a `message` (any type) to the main process asynchronously via a `channel`. The main process handles it by listening for the `channel` event with `ipc`. -Like `ipc.send` but the message will be sent to the host page instead of the -main process. +### `ipc.sendSync(channel[, message])` -This is mainly used by the page in `` to communicate with host page. +* `channel` String - The event name. +* `message` (optional) + +Send a `message` (any type) to the main process synchronously via a `channel`. A result is returned from the main process. + +The main process handles it by listening for the `channel` event with `ipc` and replies by setting the `event.returnValue`. + +**Note:** Sending a synchronous message will block the whole renderer process so +using this method is not recommended. + +### `ipc.sendToHost(channel[, message])` + +* `channel` String - The event name. +* `message` (optional) + +Like `ipc.send` but the message will be sent to the host page in a `` instead of the main process. From d02ced87b8481262f489ae4d87ff5366459ea263 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Thu, 27 Aug 2015 10:13:25 -0700 Subject: [PATCH 05/10] =?UTF-8?q?message=20=E2=86=92=20arg,=2080-col?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/ipc-main-process.md | 7 ++++--- docs/api/ipc-renderer.md | 29 ++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/api/ipc-main-process.md b/docs/api/ipc-main-process.md index 197b98e418be..c34564ef82ef 100644 --- a/docs/api/ipc-main-process.md +++ b/docs/api/ipc-main-process.md @@ -64,9 +64,10 @@ Set this to the value to be returned in a synchronous message. Returns the `WebContents` that sent the message. -### `Event.sender.send(channel[, message])` +### `Event.sender.send(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. -* `message` (optional) +* `arg` (optional) -This sends an asynchronous message back to the render process. The `message` can be any value. +This sends an asynchronous message back to the render process. Optionally, there +can be one or a series of arguments, `arg`, which can have any type. diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index 0d7b49aba701..4a5995663884 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -1,7 +1,8 @@ # ipc (renderer) The `ipc` module provides a few methods so you can send synchronous and -asynchronous messages from the render process (web page) to the main process. You can also receive messages returned from the main process. +asynchronous messages from the render process (web page) to the main process. +You can also receive messages returned from the main process. **Note**: If you want to make use of modules in the main process from the renderer process, you might consider using the [remote](remote.md) module. @@ -12,30 +13,40 @@ See [ipc (main process)](ipc-main-process.md) for code examples. The `ipc` module has the following methods for sending messages: -**Note**: When using these methods to send a `message` you must also listen for it in the main process with [`ipc (main process)`](ipc-main-process.md). +**Note**: When using these methods to send a `message` you must also listen +for it in the main process with [`ipc (main process)`](ipc-main-process.md). -### `ipc.send(channel[, message])` +### `ipc.send(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. * `message` (optional) -Send a `message` (any type) to the main process asynchronously via a `channel`. The main process handles it by listening for the `channel` event with `ipc`. +Send an event to the main process asynchronously via a `channel`. Optionally, +there can be a message: one or a series of arguments, `arg`, which can have any +type. The main process handles it by listening for the `channel` event with +`ipc`. -### `ipc.sendSync(channel[, message])` +### `ipc.sendSync(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. * `message` (optional) -Send a `message` (any type) to the main process synchronously via a `channel`. A result is returned from the main process. +Send an event to the main process synchronously via a `channel`. Optionally, +there can be a message: one or a series of arguments, `arg`, which can have any +type. The main process handles it by listening for the `channel` event with +`ipc`. -The main process handles it by listening for the `channel` event with `ipc` and replies by setting the `event.returnValue`. +The main process handles it by listening for the `channel` event with `ipc` and +replies by setting the `event.returnValue`. **Note:** Sending a synchronous message will block the whole renderer process so using this method is not recommended. -### `ipc.sendToHost(channel[, message])` +### `ipc.sendToHost(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. * `message` (optional) -Like `ipc.send` but the message will be sent to the host page in a `` instead of the main process. +Like `ipc.send` but the event will be sent to the host page in a `` +instead of the main process. Optionally, there can be a message: one or a series +of arguments, `arg`, which can have any type. From dbc1855b42a4aaeeb2bc5d35f3e3f9cd179509da Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Fri, 28 Aug 2015 14:21:37 -0700 Subject: [PATCH 06/10] Small edits --- docs/api/global-shortcut.md | 5 +++-- docs/api/ipc-main-process.md | 11 +++++++---- docs/api/ipc-renderer.md | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index 52ec17326c63..f9ca654cf50a 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -4,7 +4,7 @@ The `global-shortcut` module can register/unregister a global keyboard shortcut with the operating system so that you can customize the operations for various shortcuts. -Note that the shortcut is global; it will work even if the app does +**Note**: The shortcut is global; it will work even if the app does not have the keyboard focus. You should not use this module until the `ready` event of the app module is emitted. @@ -51,7 +51,8 @@ the registered shortcut is pressed by the user. * `accelerator` [Accelerator](accelerator.md) -Returns `true` or `false` depending on whether the shortcut `accelerator` is registered. +Returns `true` or `false` depending on whether the shortcut `accelerator` is +registered. ### `globalShortcut.unregister(accelerator)` diff --git a/docs/api/ipc-main-process.md b/docs/api/ipc-main-process.md index c34564ef82ef..bbb581fcfc9b 100644 --- a/docs/api/ipc-main-process.md +++ b/docs/api/ipc-main-process.md @@ -1,6 +1,8 @@ # ipc (main process) -The `ipc` module, when used in the main process, handles asynchronous and synchronous messages sent from a renderer process (web page). Messages sent from a renderer will be emitted to this module. +The `ipc` module, when used in the main process, handles asynchronous and +synchronous messages sent from a renderer process (web page). Messages sent from +a renderer will be emitted to this module. ## Sending Messages @@ -10,7 +12,8 @@ for more information. - When sending a message, the event name is the `channel`. - To reply a synchronous message, you need to set `event.returnValue`. -- To send an asynchronous back to the sender, you can use `event.sender.send(...)`. +- To send an asynchronous back to the sender, you can use + `event.sender.send(...)`. An example of sending and handling messages between the render and main processes: @@ -40,9 +43,9 @@ ipc.on('asynchronous-reply', function(arg) { ipc.send('asynchronous-message', 'ping'); ``` -## Methods +## Listening for Messages -The `ipc` module has the following method: +The `ipc` module has the following method to listen for events: ### `ipc.on(channel, callback)` diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index 4a5995663884..12cd11aec777 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -2,7 +2,7 @@ The `ipc` module provides a few methods so you can send synchronous and asynchronous messages from the render process (web page) to the main process. -You can also receive messages returned from the main process. +You can also receive replies from the main process. **Note**: If you want to make use of modules in the main process from the renderer process, you might consider using the [remote](remote.md) module. From 8ee91bce44798a64fe969c7b5f1ba4d6e230c373 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Fri, 28 Aug 2015 14:57:14 -0700 Subject: [PATCH 07/10] =?UTF-8?q?message=20=E2=86=92=20arg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/ipc-renderer.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index 12cd11aec777..3adb0bc95476 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -19,7 +19,7 @@ for it in the main process with [`ipc (main process)`](ipc-main-process.md). ### `ipc.send(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. -* `message` (optional) +* `arg` (optional) Send an event to the main process asynchronously via a `channel`. Optionally, there can be a message: one or a series of arguments, `arg`, which can have any @@ -29,7 +29,7 @@ type. The main process handles it by listening for the `channel` event with ### `ipc.sendSync(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. -* `message` (optional) +* `arg` (optional) Send an event to the main process synchronously via a `channel`. Optionally, there can be a message: one or a series of arguments, `arg`, which can have any @@ -45,7 +45,7 @@ using this method is not recommended. ### `ipc.sendToHost(channel[, arg1][, arg2][, ...])` * `channel` String - The event name. -* `message` (optional) +* `arg` (optional) Like `ipc.send` but the event will be sent to the host page in a `` instead of the main process. Optionally, there can be a message: one or a series From eab88ea09cc49a5180269f615393e349fa3589d8 Mon Sep 17 00:00:00 2001 From: Fritz Lin Date: Sun, 30 Aug 2015 22:53:40 +0800 Subject: [PATCH 08/10] Setting up docs translation in Chinese :+1: --- README.md | 1 + docs-translations/cn/README.md | 70 ++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 docs-translations/cn/README.md diff --git a/README.md b/README.md index ace7116c469a..32e5da2fafb3 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ contains documents describing how to build and contribute to Electron. - [Korean](https://github.com/atom/electron/tree/master/docs-translations/ko) - [Japanese](https://github.com/atom/electron/tree/master/docs-translations/jp) - [Spanish](https://github.com/atom/electron/tree/master/docs-translations/es) +- [Chinese](https://github.com/atom/electron/tree/master/docs-translations/cn) ## Community diff --git a/docs-translations/cn/README.md b/docs-translations/cn/README.md new file mode 100644 index 000000000000..124d030c46ee --- /dev/null +++ b/docs-translations/cn/README.md @@ -0,0 +1,70 @@ +## 向导 + +* [应用部署](tutorial/application-distribution.md) +* [应用打包](tutorial/application-packaging.md) +* [使用原生模块](tutorial/using-native-node-modules.md) +* [主进程调试](tutorial/debugging-main-process.md) +* [使用 Selenium 和 WebDriver](tutorial/using-selenium-and-webdriver.md) +* [调试工具扩展](tutorial/devtools-extension.md) +* [使用 PepperFlash 插件](tutorial/using-pepper-flash-plugin.md) + +## 教程 + +* [快速入门](tutorial/quick-start.md) +* [桌面环境集成](tutorial/desktop-environment-integration.md) +* [在线/离线事件探测](tutorial/online-offline-events.md) + +## API文档 + +* [简介](api/synopsis.md) +* [进程对象](api/process.md) +* [支持的Chrome命令行开关](api/chrome-command-line-switches.md) + +定制的DOM元素: + +* [`File`对象](api/file-object.md) +* [``标签](api/web-view-tag.md) +* [`window.open`函数](api/window-open.md) + +主进程可用的模块: + +* [app](api/app.md) +* [auto-updater](api/auto-updater.md) +* [browser-window](api/browser-window.md) +* [content-tracing](api/content-tracing.md) +* [dialog](api/dialog.md) +* [global-shortcut](api/global-shortcut.md) +* [ipc (main process)](api/ipc-main-process.md) +* [menu](api/menu.md) +* [menu-item](api/menu-item.md) +* [power-monitor](api/power-monitor.md) +* [power-save-blocker](api/power-save-blocker.md) +* [protocol](api/protocol.md) +* [session](api/session.md) +* [webContents](api/web-contents.md) +* [tray](api/tray.md) + +渲染进程(网页)可用的模块: + +* [ipc (renderer)](api/ipc-renderer.md) +* [remote](api/remote.md) +* [web-frame](api/web-frame.md) + +两种进程都可用的模块: + +* [clipboard](api/clipboard.md) +* [crash-reporter](api/crash-reporter.md) +* [native-image](api/native-image.md) +* [screen](api/screen.md) +* [shell](api/shell.md) + +## 开发 + +* [编码规范](development/coding-style.md) +* [源码文件结构](development/source-code-directory-structure.md) +* [与 NW.js (原名 node-webkit) 在技术上的差异](development/atom-shell-vs-node-webkit.md) +* [构建系统概况](development/build-system-overview.md) +* [构建步骤 (Mac)](development/build-instructions-mac.md) +* [构建步骤 (Windows)](development/build-instructions-windows.md) +* [构建步骤 (Linux)](development/build-instructions-linux.md) +* [在调试中使用 SymbolServer](development/setting-up-symbol-server.md) From 3d4f0dfc44003956dc1abbac5e8fe87ef82b56a1 Mon Sep 17 00:00:00 2001 From: Fritz Lin Date: Mon, 31 Aug 2015 11:02:37 +0800 Subject: [PATCH 09/10] Move cn to zh-CN for future traditional Chinese translations ref #2649 --- README.md | 2 +- docs-translations/{cn => zh-CN}/README.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs-translations/{cn => zh-CN}/README.md (100%) diff --git a/README.md b/README.md index 32e5da2fafb3..7f398cbd943b 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ contains documents describing how to build and contribute to Electron. - [Korean](https://github.com/atom/electron/tree/master/docs-translations/ko) - [Japanese](https://github.com/atom/electron/tree/master/docs-translations/jp) - [Spanish](https://github.com/atom/electron/tree/master/docs-translations/es) -- [Chinese](https://github.com/atom/electron/tree/master/docs-translations/cn) +- [Simplified Chinese](https://github.com/atom/electron/tree/master/docs-translations/zh-CN) ## Community diff --git a/docs-translations/cn/README.md b/docs-translations/zh-CN/README.md similarity index 100% rename from docs-translations/cn/README.md rename to docs-translations/zh-CN/README.md From af52eda0eb224ce3081d1a8c8c95d6c97dccd2e7 Mon Sep 17 00:00:00 2001 From: Robo Date: Sat, 29 Aug 2015 20:44:52 +0530 Subject: [PATCH 10/10] process: api to set file descriptor soft limit --- atom/common/api/atom_bindings.cc | 4 ++++ docs/api/app.md | 1 - docs/api/process.md | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index c748647f48d0..d6fb355e09d8 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -11,6 +11,7 @@ #include "atom/common/chrome_version.h" #include "atom/common/native_mate_converters/string16_converter.h" #include "base/logging.h" +#include "base/process/process_metrics.h" #include "native_mate/dictionary.h" #include "atom/common/node_includes.h" @@ -61,6 +62,9 @@ void AtomBindings::BindTo(v8::Isolate* isolate, dict.SetMethod("crash", &Crash); dict.SetMethod("hang", &Hang); dict.SetMethod("log", &Log); +#if defined(OS_POSIX) + dict.SetMethod("setFdLimit", &base::SetFdLimit); +#endif dict.SetMethod("activateUvLoop", base::Bind(&AtomBindings::ActivateUVLoop, base::Unretained(this))); diff --git a/docs/api/app.md b/docs/api/app.md index db34d37ec59e..07b26f2c5663 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -269,7 +269,6 @@ Adds `tasks` to the [Tasks][tasks] category of the JumpList on Windows. consists of two or more icons, set this value to identify the icon. If an icon file consists of one icon, this value is 0. - ### `app.commandLine.appendSwitch(switch[, value])` Append a switch (with optional `value`) to Chromium's command line. diff --git a/docs/api/process.md b/docs/api/process.md index c9efa22fe0f9..930a5860fc44 100644 --- a/docs/api/process.md +++ b/docs/api/process.md @@ -11,3 +11,10 @@ upstream node: ## process.hang Causes the main thread of the current process hang. + +## process.setFdLimit(maxDescriptors) _OS X_ _Linux_ + +* `maxDescriptors` Integer + +Sets the file descriptor soft limit to `maxDescriptors` or the OS hard +limit, whichever is lower for the current process.