process.stdin

process.stdin

process.stdin

Function

Sets the text to be written to the child process's standard input.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
textAnyNoNullStandard input text.

Return value

TypeDescription
ProcessReturns the new process builder.

Example

Notes

  • After setting stdin, child() uses piped mode to write text and close the stdin pipe.
  • stdin(text) only configures the text to be written; the actual writing occurs when child() starts the child process.
  • When stdin(text) is not set, child() closes the child process stdin by default and does not inherit the parent process stdin.