Skip to content
Multiplexed stdin/out/err access via UNIX sockets
C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
Makefile
README.md
child.c
child.h
io.c
io.h
lines.c
lines.h
lines_test.c
list.c
list.h
list_test.c
plexio.c
plexio.h

README.md

plexio

Installation

make
cp plexio /usr/local/bin/

Usage

First argument is the UNIX socket to listen on. The next arguments are the command to mask.

For instance, to launch a Minecraft server:

plexio /tmp/minecraft java -jar minecraft_server.jar

Now, to access the stdin and out of the process, open a connection to the UNIX socket specified. For instance, using netcat wrapped in readline:

rlwrap nc -U /tmp/minecraft

(For accessing Minecraft servers that are wrapped in anyconsole, I've written lolmc as a front-end to this UNIX socket for Node.js scripts.)

This is approximately equivalent to

stdbuf -oL java -jar minecraft_server.jar > minecraft.log 2>&1
tail -fn 0 minecraft.log

except, of course, that you have access to the stdin of the process as well.

License

If you would like to use this project in a free and open source software stack, let me know via a message on GitHub and I will slam on the license you need.

You can’t perform that action at this time.