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

Solaris: pty_openpty() call to set the size fails with EINVAL #14

Closed
TooTallNate opened this issue May 1, 2012 · 1 comment
Closed

Comments

@TooTallNate
Copy link
Collaborator

So it looks like the initial call to set the size fails on solaris with EINVAL (22).

As a hack workaround, I fixed it in JS-land:

diff --git a/lib/pty.js b/lib/pty.js
index b6a1efa..ac6f763 100644
--- a/lib/pty.js
+++ b/lib/pty.js
@@ -60,6 +60,10 @@ function Terminal(file, args, opt) {

   // fork
   term = pty.fork(file, args, env, cwd, cols, rows);
+
+  // XXX: solaris hack...
+  pty.resize(term.fd, cols, rows);
+
   this.socket = new net.Socket(term.fd);
   this.socket.setEncoding('utf8');
   this.socket.resume();

But I assume there's probably a cleaner fix in C-land.

@chjj
Copy link
Owner

chjj commented May 1, 2012

That's really strange. I hope there is a better fix in c-land. What is process.platform under solaris/sun? I'd prefer to add this fix only for sun if it ends up being necessary.

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

No branches or pull requests

2 participants