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

shellalike.Process.write requires ByteString only, need to be generic "binary thing" #62

Open
GoogleCodeExporter opened this issue Aug 23, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

 I bumped into this in shellalike:

 this.write = function Process_write(s) {
    //print("WRITING TO", snk, 'THIS', s);                                                                       
    if (!s instanceof ByteString)
      s = new ByteString(String(s));
    var result = _write.call(snk, s, s.length);
    /* Write error */

Wes: if (b instanceof require("binary").Binary)  b = 
require('binary').ByteArray(b)

Wes: in the future, I also intend to expose a  require("gpsee").isByteThing    
which would be 
smarter than instanceof require("binary").Binary


Another option is to make a new Process class, that exposes three streams (at 
least 2 stdin + 
stdout anyways), and let the caller do the rest.



Original issue reported on code.google.com by nickgsup...@gmail.com on 12 Apr 2010 at 4:26

@GoogleCodeExporter
Copy link
Author

On my machine at home I have another patch related to this, so I'll hit this 
bug soon.

Original comment by donny.vi...@gmail.com on 12 Apr 2010 at 7:48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant