1. Binding request
- Posted by ChrisB (moderator) Mar 24, 2012
- 1440 views
Hi
I code, run and bind eu programs over ssh. Occasionally when binding, ssh times out, the reason being there are no characters being shown on the terminal, and ssh (whether its a linux console or putty) thinks that the session has expired and closes the connection. I know you can set up putty to send keepalives.
However, what would be nice would be if there was a command line switch so that binding large programs looked like it was doing something, a verbose mode, a cycling |/-\|/-\, or consecutive stops ........... - ie anything anything to send a terminal signal.
Is this possible?
Chris
2. Re: Binding request
- Posted by BRyan Mar 24, 2012
- 1437 views
Hi Chris:
I look up putty on the internet, maybe this setting might have something to do with it.
4.1.3 ‘Close Window on Exit’
Finally in the Session panel, there is an option labelled ‘Close Window on Exit’.
This controls whether the PuTTY terminal window disappears as soon as the session
inside it terminates. If you are likely to want to copy and paste text out of the
session after it has terminated, or restart the session, you should arrange for
this option to be off.
‘Close Window On Exit’ has three settings. ‘Always’ means always close the window
on exit; ‘Never’ means never close on exit (always leave the window open, but
inactive). The third setting, and the default one, is ‘Only on clean exit’. In
this mode, a session which terminates normally will cause its window to close, but
one which is aborted unexpectedly by network trouble or a confusing message from the
server will leave the window up.
3. Re: Binding request
- Posted by jimcbrown (admin) Mar 24, 2012
- 1434 views
I know you can set up putty to send keepalives.
My preferred solution is to run GNU screen and set up a running date/time prompt in the screen session, so the time will be updated one a second (or maybe once a minute) - which sends data over ssh often enough to keep it from timing out.
However, what would be nice would be if there was a command line switch so that binding large programs looked like it was doing something, a verbose mode, a cycling |/-\|/-\, or consecutive stops ........... - ie anything anything to send a terminal signal.
Is this possible?
Chris
In short, yes. You could put the appropriate hooks into source/emit.e:emit_op (when we convert from source to IL) and in source/compress.e (when we write out the IL for shrounded or bound files along with some IL metadata) and source/parser.e:next_token() (when we are parsing the Euphoria source code of the program) - making a progress bar might be harder since you'd have to calculate the total time and update in small steps accordingly, but for a first step you could just print out a hash character for every op emitted, token scanned, etc.
Even easier, you could try to create a task at the start of bind.ex, run it, and then tell it to stop itself when the binder has finished (again, in bind.ex itslef, after the last line where main.e is included). This version might be more difficult to be made to display an accurate progress bar, however.
4. Re: Binding request
- Posted by jimcbrown (admin) Mar 24, 2012
- 1434 views
Hi Chris:
I look up putty on the internet, maybe this setting might have something to do with it.
4.1.3 ‘Close Window on Exit’
As someone who is skilled in using ssh, I can tell you that this setting has absolutely nothing to do with the problem that Chris is dealing with and won't help him.
One nice feature of GNU screen is that if the ssh session were to be disconnected by other means (e.g. someone pulls out your network cable or unplugs your router) then the GNU screen session will continue to run bind while you are disconnected and you can log back into ssh later to see how things went ( - or log back in immediately to keep an eye on it, after you've plugged your cable back in).
5. Re: Binding request
- Posted by ChrisB (moderator) Mar 26, 2012
- 1350 views
Hi
Thanks. Would like to add that even though the session is timing out, the shell does keep running on the remote machine, because even though it always disconnects during the bind process, I use gzexe to compress the runtime, which always completes. It's just inconvenient to have to log in again.
I shall look at that running time prompt idea though.
Chris