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
ESR's paradigm
release early, release often
in mind.
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.
version 0.6.4-20071020-171424 | CygWin compile fixes. It shall now compile under CygWin again. |
version 0.6.3-20070921-135245download (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 |
version 0.6.2-20070918-224216download (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. |
version 0.6.1-20070830-002352download (213598 bytes) | Usage corrected Before the usage was distorted (several typos). |
version 0.6.0-20070829-235605download (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). |
version 0.5.12-20070829-223019(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). |
version 0.5.11-20070825-123201(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. |
version 0.5.10-20070601-135749download (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. |
version 0.5.9-20070429-233215(191920 bytes archive) | Minor changes |
version 0.5.8-20070419-192416download (191364 bytes) | Minor changes |
version 0.5.7-20070407-133320download (176671 bytes) | Better cron support for script/autostart.sh |
version 0.5.6-20070331-231941download (173740 bytes) | Bugfix for script/autostart.sh |
version 0.5.5-20070326-200028download (173678 bytes) | Bugfix release for CygWin |
version 0.5.4-20070326-014053download (173582 bytes) | Bugfix release (do not use 0.5.3!) logfile and outfile are now working again. script/autostart.sh now shall work as expected, too. |
version 0.5.3-20070304-035306(170667 bytes archive) | logfile and outfile are now using realpath, so you no more need to give absolute paths on daemonizing. Also logging made more clear and an example cron script script/autostart.sh added. Current version of tinolib has Ubuntu 64 bit fixes and some minor changes. |
version 0.5.2-20060816-053744download (164533 bytes) | Another bugfix release. There was a typo when reporting the exit status of the child referencing an uninitialized variable. |
version 0.5.1-20060812-000923(162316 bytes archive) | Bugfix release. Did not work any more without option -c If option -d is present ptybuffer now returns the exit status of the child. Else you can only see it in the log (option -l). Still please ignore "ptybufferconnect", this is not ready yet. |
version 0.5.0-20060726-142036(157781 bytes archive) | Options -t, -c and -f added Please ignore "ptybufferconnect", this is not ready yet. |
version 0.4.0-20060412-010107download (150332 bytes) | Slight improvements New tinolib shall help with "make distclean; make" on Debian Sarge stdin now can be the controlling socket or can be treated as "the first connect". Option -n to give the history length. As always this version is nearly untested. If you have trouble revert to previous version, it's successfully in productive use for a long time now. |
version 0.3.1-20041112-055422download (85589 bytes) | Corrected bug when daemonizing and options -o and -l were not given |
version 0.3.0-20041022-031455 | Logfiles, can run in foreground, options added and minor bugfix WARNING! Version is nearly untested. ptybuffer was extended to accept options. It now can run from /etc/inittab or deamontools and has support to write logfiles, too. Please see the help which comes when ptybuffer is called without any argument. A little bug was fixed which could cause data transferred to the terminal to wait in ptybuffer until new data arrives to the terminal. Additional note: The NWNadm part in this version was removed. It will show up as an independent package in future.
|
version 0.2.4-20040705-035630download (53210 bytes) | Minor changes This only is an update to reflect the version of NWNadm (2.6.2) which now runs here for a longer time now. |
version 0.2.3-20040613-082418download (52534 bytes) | This fixes a major bug in the socket implementation. When more than 16 sockets are used, the implementation was very likely to fail. I fixed the socket implementation. |
version 0.2.2-20040603-072533 | Mainly updated NWNadm NWNadm starts to become usable. File upload/download is implemented, but due to missing dabase support there is no connection between the upload directory and the NWN server, except you do it yourself. There is limited Mozilla support, too. However it looks like Mozilla, like IE, needs a multi-connection-patch, which I did not find out yet how to do. So with Mozilla you can only have one of the running windows open in parallel. This means, if you have more than one server, NWNadm does not work well with Mozilla for now. |
version 0.2.1-20040521-124406 | This version fixes a major memory corruption issue. Thanks to -lefence it was easy to track this down. Previous versions may segfault unconditionally when sockets connect. |
[view more history] | [view complete history] |
License and Disclaimer
All you can see here is free software according to the GNU GPL. |