Skip to content
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

doc: process.stdout.fd is mentioned but undocumented #22873

Closed
vsemozhetbyt opened this issue Sep 15, 2018 · 5 comments
Closed

doc: process.stdout.fd is mentioned but undocumented #22873

vsemozhetbyt opened this issue Sep 15, 2018 · 5 comments
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. question Issues that look for answers.

Comments

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Sep 15, 2018

process.stdout.fd is mentioned in these 2 sections:

https://nodejs.org/api/async_hooks.html#async_hooks_printing_in_asynchooks_callbacks
https://nodejs.org/api/async_hooks.html#async_hooks_asynchronous_context_example

But it is not documented in process.stdout or in a section of any mentioned prototype (net.Socket, Duplex or Writable stream).

Should it be documented with process.stdin.fd and process.stderr.fd?

@vsemozhetbyt vsemozhetbyt added question Issues that look for answers. doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Sep 15, 2018
@Fishrock123
Copy link
Contributor

I think those only exist when stdio is a net.Socket (and probably comes from net.Socket), not sure that the FS thing has the same property.

We might want to specify what the stdio "handles" can inherit from (what classes they can be).

@Trott
Copy link
Member

Trott commented Nov 14, 2018

@nodejs/documentation @nodejs/process

@bnoordhuis
Copy link
Member

.fd was specifically added as a property to help debugging, no more, no less. It shouldn't be documented because on some platforms it's not even always the actual file descriptor.

@Trott
Copy link
Member

Trott commented Nov 18, 2018

.fd was specifically added as a property to help debugging, no more, no less. It shouldn't be documented because on some platforms it's not even always the actual file descriptor.

So mention of its use should be removed from the async_hooks docs that @vsemozhetbyt linked to above? @nodejs/async_hooks @nodejs/documentation

gireeshpunathil added a commit to gireeshpunathil/node that referenced this issue Nov 30, 2018
The examples show `process.stdout.fd` as a means to use synchronous writes
in async_hooks context. However this is an undocumented field, so showcase
a file write example instead.

Fixes: nodejs#22873
Trott pushed a commit to Trott/io.js that referenced this issue Dec 4, 2018
The examples show `process.stdout.fd` as a means to use synchronous
writes in async_hooks context. However this is an undocumented field,
so showcase a file write example instead.

Fixes: nodejs#22873

PR-URL: nodejs#24741
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@Trott
Copy link
Member

Trott commented Dec 4, 2018

Fixed in 9159fb7

@Trott Trott closed this as completed Dec 4, 2018
BridgeAR pushed a commit that referenced this issue Dec 5, 2018
The examples show `process.stdout.fd` as a means to use synchronous
writes in async_hooks context. However this is an undocumented field,
so showcase a file write example instead.

Fixes: #22873

PR-URL: #24741
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
refack pushed a commit to refack/node that referenced this issue Jan 14, 2019
The examples show `process.stdout.fd` as a means to use synchronous
writes in async_hooks context. However this is an undocumented field,
so showcase a file write example instead.

Fixes: nodejs#22873

PR-URL: nodejs#24741
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
BethGriggs pushed a commit that referenced this issue Feb 12, 2019
The examples show `process.stdout.fd` as a means to use synchronous
writes in async_hooks context. However this is an undocumented field,
so showcase a file write example instead.

Fixes: #22873

PR-URL: #24741
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
BethGriggs pushed a commit that referenced this issue Feb 20, 2019
The examples show `process.stdout.fd` as a means to use synchronous
writes in async_hooks context. However this is an undocumented field,
so showcase a file write example instead.

Fixes: #22873

PR-URL: #24741
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
rvagg pushed a commit that referenced this issue Feb 28, 2019
The examples show `process.stdout.fd` as a means to use synchronous
writes in async_hooks context. However this is an undocumented field,
so showcase a file write example instead.

Fixes: #22873

PR-URL: #24741
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. question Issues that look for answers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants