ION
NAMESYNOPSIS
DESCRIPTION
EXIT CODES
DOWNLOADS
AUTHORS
BUG REPORTS
COPYRIGHT
NAME
ion - Input/Output Normalizer
SYNOPSIS
ion PROGRAM [ARGS...]
DESCRIPTION
Run PROGRAM with its standard streams attached to a PTY. This makes sure the streams are line buffered.
Additional arguments (ARGS) are passed to PROGRAM verbatim.
Ion is normally used as an auxiliary tool for running PROGRAM from another program and communicating with it via pipes. In this case, the program standard streams attached to pipes become fully buffered by default. Running PROGRAM via ion ensures the streams are line-buffered.
Often it is not possible or desirable to alter the calling program so, that it would run ion instead of the intended PROGRAM. Taking into account this, ion implements a special calling convention. Namely, unless invoked as ion it tries to spawn the program it is invoked as with the arguments from its command line. The PROGRAM (unless started with an absolute pathname) is then searched in the system PATH, excluding the directory where the invoked copy of ion itself is located.
To use this feature, make sure you link ion to a program name in a directory preceding the one where the actual program is located in PATH.
For example, suppose you want to run xfs_db(8) which is normally located in /usr/bin. Then, supposing that /usr/local/bin precedes /usr/bin in PATH, install ion there and link it to xfs_db:
$ cp ion
/usr/local/bin
$ cd /usr/local/bin
$ ln -s ion xfs_db
Once done, invoking xfs_db from your program will first invoke ion, which in turn will run xfs_db from /usr/bin.
EXIT CODES
Ion exits with the exit code of the program it ran. If the program terminates on a signal, ion issues a diagnostic message and exits with code 127. If an error occurs (e.g., unable to allocate PTY, etc.), the exit code is 126.
If ion is invoked without arguments, it prints a short usage summary and exits with code 125.
DOWNLOADS
Ion is available in source form from its git repository.
Recent news, changes and bugfixes can be tracked from the project's development page.
AUTHORS
Sergey Poznyakoff
BUG REPORTS
Report bugs to <gray@gnu.org>.
COPYRIGHT
Copyright
© 2013–2024 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and
redistribute it. There is NO WARRANTY, to the extent
permitted by law.
Manpage server at man.gnu.org.ua.
Powered by mansrv 1.1