linux - Custom stdin for Node.js child process -


is possible execute child process in node.js custom stdin under linux?

the documention refers stdinstream internal use only:

there several internal options. in particular stdinstream, stdoutstream, stderrstream. internal use only. undocumented apis in node, should not used.

why it's internal use only? tried give custom readablestream it, yielded nasty v8 exception. no surprise after using internal api...

some background: need execute git commit after node.js process has closed stdin (this cannot workaround currently). issue git gets angry @ if try commit closed stdin.

update: issue originates a node.js bug, i'll keep question here since think i'm not 1 wondering this.

rather using stdinstream, think should use customfds instead. same documentation:

there deprecated option called customfds allows 1 specify specific file descriptors stdio of child process. api not portable platforms , therefore removed. customfds possible hook new process' [stdin, stdout, stderr] existing streams; -1 meant new stream should created. use @ own risk.

as says, deprecated because of platform compatibility (i'm guessing windows). if don't want/need support windows, think customfds safer choice, since, although it's deprecated, part of api, while stdinstream never was.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -