node.js STDIN works with process.stdin, not when piped -


I'm using the requirement ("child_process") Span and executable calling, which is initially stopping for a password to be an input; If I use it as below:

  var spawn = is required ("child_process"). Var exe = spawn ("NameOfExe.exe", [/ * arguments * /], {stdio: [process.stdin, process.stdout, process.stderr]});  

It works perfectly (yes, I know that I can inherit, shash: p). I can type inside my console and accept it with no problem.

However, if I do this:

  var spawn = require ("child_process") .spawn; Var exe = spawn ("NameOfExe.exe", [/ * arguments * /], {stdio: ["pipe", process.stdout, process.stderr]}); Exe.stdin.write ("password \ n");  

then executable does not even receive stdin; It goes immediately to fail the execution.

I am completely in a loss for this. Any suggestions?

Edit:

I think I can be anything!

So I'm 99.99% sure that the executable is using C # and the console. Read to get the password. However, an exception is thrown when the property is redirected elsewhere.

So it does tell, but there is no way to use the node on it, or am I on the mercy of people, it has been made executable?

  Readkey method reads from the keyboard, even if the standard input is redirected file with SetIn method To do this, you understand that it does not use the hardware controller / hal, and the original binding of the shell to handle stdio. 


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -