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

tcgetattr(slave pty) fails on SunOS 5.10 with "Invalid argument" #6

hanslub42 opened this issue May 23, 2014 · 2 comments


None yet
1 participant
Copy link

commented May 23, 2014

on SunOS 5.10 Generic_144488-11 sun4u sparc SUNW,SPARC-Enterprise:

bash-3.00$ rlwrap perl
Warning: rlwrap cannot determine terminal mode of perl
(because: Invalid argument).

NB: rlwrap 0.37 used to sleep for 1 sec before calling tcgetattr() on the slave pty
Maybe this was a good idea after all ....?


This comment has been minimized.

Copy link
Owner Author

commented May 23, 2014

sleeping a little before the tcgetattr() call cures the problem.

maybe I should use a loop:

for (timeout = blink_of_eye; timeout *= 2; timeout < too_long)
  if (tcgetattr(..) == 0) {
    do stuff;
  } else

This comment has been minimized.

Copy link
Owner Author

commented May 26, 2014

Solved by repeatedly trying the tcgetattr() (with increasing intervals) until rlwrap gives up after 2 sec

@hanslub42 hanslub42 closed this May 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.