Even when no session name was provided the passthrough flag was still
implicitly enabled in case stdin was not a terminal. This behavior
prevented the session list from being printed i.e.
abduco < /dev/null
would not work as expected. Only enable implicit passthrough if stdin
is not a terminal *and* a session name is given.
Fix#34
The supervised command can use it to determine in which session it
is running. It is not necessarily identical to the file name of the
underlying socket as stored in the file system.
This allows commands to be send interactively (i.e. when stdin refers
to a terminal). Also imply attach action if none is given, hence:
$ abduco -p session
cowsay hi
^D
can also be used to send input to a session.
This should make it possible to connect with a 32bit client to a 64bit
server. This might also make it possible to forward the abduco socket
over SSH as described in #25. Different endianness are not supported at
this time.
This is a breaking protocol change. Make sure to use the same version
as client and server (anything else is unsupported anyway!).
In particular
$ abduco -e ^q
will now also print the session list which is useful if the
default detach key is changed by means of a shell alias.
Closes#10
This means it wont take control over the window size until
it is the last remaining one, unless another client connects
with the -l option set at a later time.
With this it should be possible to create sessions for which a
dead left over socket still exists. Also the session list as
printed by abduco without any arguments will delete those stale
sockets.
Here are the steps:
1) Run 'abduco -A foo ping suckless.org'
2) Press 'CTRL+\' to detach
3) Run 'abduco -A foo' to reattach
4) Press 'CTRL+\' and it flashes the screen but does not detach
5) Press 'CTRL+\' a second time and it detaches this time
Here's what the output looks like:
$ abduco -A foo ping suckless.org
abduco: foo: detached
$ abduco -A foo
abduco: foo: detached
abduco: foo: detached
$
Also, oddly, I am only seeing this behavior on my Ubuntu Linux host, not
my AIX hosts.
Create sockets in a per user directory with proper permissions
either in
$HOME/.abduco/session-name
or if not possible in
/tmp/abduco/$USER/session-name