The software on this pages will slowly be moved to GitHub https://github.com/hilbix/. The CVS repository will be migrated to GIT as well, so the history will be preserved, a bit. See FAQ.
The tools are developed under Linux with
release early, release often
So you can consider this beta software, or alpha, or pre-alpha, or even worse ;)
Have a look in the download directory for all downloads.
As always here, all you get is the source. No binaries here.
daemonize interactive tty line driven programs with output history
⇒ ⇒ ⇒ The development shifted to another location. All future versions will be published at https://github.com/hilbix/ptybuffer ⇐ ⇐ ⇐
ptybuffer was designed to get rid of screen/expect constructs to improve stability. It deamonizes programs which need a tty/pty to operate. Unix domain sockets then can connect, send lines to the program and receive the output (with history) of the program in real time.
It's (again) in the alpha phase. NWNadm has been removed and will show up as an idependent package.
Example how to fork off a web based emergency shell with ptybuffer
(this is a extreme security risk if you don't protect it!):
mkdir -p $HOME/public_html/shell/ cp -rp php/. $HOME/public_html/shell/ $HOME/public_html/startshell.sh Start your browser with http://127.0.0.1/~$USER/shell/If you don't understand this, don't even try it. It's too dangerous!
Note: You can use ptybufferconnect to connect to the ptybuffer socket, but you can also use a tool like socat.
Implementation note: ptybuffer is not able to send lines longer than BUFSIZ to the terminal. This is not true if option -i is used.
CygWin compile fixes.
It shall now compile under CygWin again.
download (219758 bytes)
Minor resource leakage fixed. Scripts placed under the CLL.
With option -c ptybuffer previously kept one socket fd open which was not needed.
For more information about the CLL see http://permalink.de/tino/cll
download (217271 bytes)
Important bugfix and minor change in bin/autostart.sh for better logging control
I found a serious bug in my sock_select function in case of foced poll operation. It is unknown if ptybuffer was affected, however I think some unreliablilities might be present in former version.
However there was (as always) many changes on other places in my lib, so I am not sure (yet) if this version is more stable than before.
download (213598 bytes)
Before the usage was distorted (several typos).
download (213690 bytes)
64 bit bugfix, option -i and -k, ptybufferconnect now sends to stdout
After some searching I found where the presentation bug hid. Also the last bugfix disabled option -t (which did not work correctly before I think). This version here shall fix all that now. With option -i and -k this can be considered a 0.6.0. However ptybufferconnect is not yet as complete as I would like to see it.
Also ptybufferconnect now writes data to stdout (before it was stdin, oops).
(213352 bytes archive)
Longstanding BUG fixed:
When a ptybuffer runs so long that more than 2 billion read operations were done, output to the socket would starve and ptybuffer will eat up 100% CPU when a socket is connected. This is due to an 32 bit to 64 bit signed overrun. I am not completely sure if this really happens, but there is the possibility.
YOU SHOULD NOT USE OLDER VERSIONS OF PTYBUFFER! However, I do not know if this version here is as stable as the old ones. So I did not renmove the downloads.
Note that there still might be a bug left if ptybuffer runs over 2^63 read operations from the started program. As this is unlikely to happen (at 1 billion reads per second this needs 272 years) ever, I better tell it here ;)
Also ptybufferconnect now, by default, sends a LF, as ptybuffer currently ignores incomplete lines (which is a bug. Incomplete lines shall be sent to the program when a socket disconnects, to be able to just send a CTRL-C or similar without an LF). If you want no LF, use the option -i (which corresponds to the option -i of ptybuffer which not yet is present).
(212258 bytes archive)
Ptybufferconnect a little bit more usable, new options plus minor update release. Added the php/ subdirectory for web based shell demo.
The tool ptybufferconnect now starts to do something reasonable. It is far from beeing read yet, though. Interactive mode is still missing.
This version uses the latest internal changes in my library, so it is - again - somewhat experimental. Use 0.5.10 if you have trouble, this version is considered stable.
Option -p was added for timestamping in the output logfile (-o). Also option -q was added so that ptybuffer now by default prints some info.
download (197102 bytes)
Bufix and minor improvement release.
DO NOT USE VERSION 0.5.9! Use 0.5.8 or 0.5.10 instead.
I moved SIGPIPE out of main and just ignored it in the part which goes away for daemonizing. Apparently SIGPIPE must be ignored in the resident part, too, as it sometimes shows up. Dunno why. Also dunno why the program just goes away (SIG_DFL?). Now SIGPIPE shall no more make trouble.
A second bug was, when it came to logging. The argument '-' (log/out to stderr/out) was no more correctly processed for logfiles. Also another change now is, that logging by default is turned off completely, so you must enable it and use '-' if you want the old (intermediate, I think it wasn't there from the beginning) behavior.
The minor improvement is, that ptybuffer now hands out the number of skipped bytes at the beginning, to ease script development to re-attach to ptybuffer. Still not perfect though, there shall be some better way to negotiate content positions.
Also some minor changes to reflect the new library routine names.
This version is released even more early to fix the bug, so it's nearly untested.
(191920 bytes archive)
download (191364 bytes)
|[view more history]||[view complete history]|
License and Disclaimer
All you can see here is free software according to the GNU GPL.