File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1061,6 +1061,15 @@ pipes between the parent and child. The value is one of the following:
1061
1061
corresponds to the index in the ` stdio` array. The stream must have an
1062
1062
underlying descriptor (file streams do not start until the ` ' open' ` event has
1063
1063
occurred).
1064
+ **NOTE:** While it is technically possible to pass ` stdin` as a writable or
1065
+ ` stdout` /` stderr` as readable, it is not recommended.
1066
+ Readable and writable streams are designed with distinct behaviors, and using
1067
+ them incorrectly (e.g., passing a readable stream where a writable stream is
1068
+ expected) can lead to unexpected results or errors. This practice is discouraged
1069
+ as it may result in undefined behavior or dropped callbacks if the stream
1070
+ encounters errors. Always ensure that ` stdin` is used as writable and
1071
+ ` stdout` /` stderr` as readable to maintain the intended flow of data between
1072
+ the parent and child processes.
1064
1073
7. Positive integer: The integer value is interpreted as a file descriptor
1065
1074
that is open in the parent process. It is shared with the child
1066
1075
process, similar to how {Stream} objects can be shared. Passing sockets
You can’t perform that action at this time.
0 commit comments