Commit Graph

167 Commits

Author SHA1 Message Date
Marc André Tanner e48ea73ce0 Move server_accept_client function around 2018-03-18 15:06:37 +01:00
Marc André Tanner bb7e4e77f4 Remove MSG_REDRAW it was actually never sent by the client 2018-03-18 15:06:31 +01:00
Marc André Tanner 17b386e93f Print MSG_EXIT packet exit code in debug output 2018-03-18 15:05:27 +01:00
Marc André Tanner 52d5c7d098 Update test suite to account for ignored output
If stdin is not a terminal no command output will be received.
2018-03-17 13:30:52 +01:00
Marc André Tanner fd34b98db7 Add explicit option for command pass through
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.
2018-03-17 13:30:52 +01:00
Marc André Tanner c901f2bbb8 If stdin is not a terminal pass-through its data to the session
This allows to send commands to a running session:

    echo cowsay hi | abduco -a session

See #8 for initial discussion of the feature.
2018-03-17 13:30:52 +01:00
Marc André Tanner 5a46912d62 Add -q (quiet) option to disable unnecessary output 2018-03-17 13:30:52 +01:00
Marc André Tanner 3e3308d4e3 Only manipulate output terminal state if it is a terminal 2018-03-17 13:30:51 +01:00
Marc André Tanner fdbda93131 Correct EOF handling on client stdin
Previously we would end in an infinite loop which might be the cause
of #15.
2018-03-17 13:30:51 +01:00
Marc André Tanner 315338a572 Update year numbers 2018-03-17 13:30:25 +01:00
Marc André Tanner 650f2ec348 Merge branch 'patch-1' of https://github.com/waldyrious/abduco
Conflicts:
	LICENSE
2018-03-17 13:28:28 +01:00
Marc André Tanner a1db9e2dae Check return value of chdir(2) where it makes sense 2017-06-27 10:09:32 +02:00
Marc André Tanner 66a17ed03d Add configure script to detect compiler flags and feature test macros
This is the same musl originated configure script as vis uses.
2017-06-27 10:09:32 +02:00
Marc André Tanner 1f1c02a3b0 Avoid use of BUFSIZ to guarantee system independent package size 2017-06-27 08:50:10 +02:00
Marc André Tanner 482237919b Fix length of MSG_RESIZE packet
We no longer send the complete struct winsize.
2017-06-27 08:49:22 +02:00
Marc André Tanner 7ee5e79cf5 Update year numbers 2017-06-21 23:12:55 +02:00
Marc André Tanner 8964601fe1 Use fixed size integer types in protocol messages
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!).
2017-06-21 22:52:14 +02:00
Marc André Tanner 6375556846 Use defines instead of numeric values for standard file descriptors 2017-06-21 22:51:54 +02:00
Waldir Pimenta 228b609361 add license title
It's not strictly required, but it's useful metadata, and part of the recommended license template text:
- http://choosealicense.com/licenses/isc/
- https://opensource.org/licenses/isc-license
- http://spdx.org/licenses/ISC.html#licenseText
2016-07-29 09:43:02 +01:00
Marc André Tanner df780cf6cc Mention release in README 2016-03-24 15:50:08 +01:00
Marc André Tanner e76729a2df Set version to 0.6 2016-03-24 14:48:23 +01:00
Marc André Tanner a0d8e45cfe Update year to 2016 2016-03-24 14:48:23 +01:00
Stefano Frabetti c6b2e7da31 Clarify KEY_REDRAW default value (i.e. disabled) 2016-01-31 19:08:52 +01:00
Marc André Tanner e671c024c9 Only test for redraw key if it is actually configured
This should make CTRL-Space work by default.
2016-01-31 11:53:43 +01:00
Marc André Tanner 5b9fcf5e52 Revert "Set sticky bit on socket"
This reverts commit 15ae398ea5.

Setting the sticky bit on a file is not really portable and
causes more problems than it solves.

The reason why this was done in the first place, is that the
XDG Base Directory Specification states that files with the
sticky bit set should not be touched by periodic cleanup
procedures.

Close #13
2016-01-25 08:17:57 +01:00
Marc André Tanner f71f02e6d6 Merge branch 'env' of https://github.com/Pyrohh/abduco 2016-01-25 08:17:20 +01:00
Michael Reed 463f7ee3f5 testsuite: Remove bashisms and switch to sh(1)
The BSDs don't have bash installed by default, but just about every
POSIX system has a /bin/sh.
2016-01-25 01:46:27 -05:00
Michael Reed 25d64fa93c Fix manual page markup
The space between `-e detachkey` was being underlined, when only
`detachkey` should be.

Tested with mandoc from OpenBSD -current and groff 1.22.3, the latter of
which is used by the vast majority of Linux distributions for formatting
manual pages.
2016-01-25 01:26:10 -05:00
Marc André Tanner a6418af4dd Properly handle EOF when reading from underlying application 2016-01-20 12:50:22 +01:00
Marc André Tanner 586d751d7e Mention release in README 2016-01-15 12:51:28 +01:00
Marc André Tanner 250288cff2 Set version to 0.5 2016-01-09 12:04:33 +01:00
Marc André Tanner 25d9df6fea Make default command configurable via config.def.h 2016-01-09 11:55:55 +01:00
Marc André Tanner 42bb83bbb6 Change default command handling to not use out of scope variable
Should fix CID 121406.
2016-01-09 11:55:52 +01:00
Marc André Tanner 62d31e784c Add recommendation to run applications within dvtm under abduco to README 2016-01-09 09:57:13 +01:00
Marc André Tanner fdd0c4163f Use the shell to execute default command given by $ABDUCO_CMD
This allows to specify a default command with arguments as in:

 $ ABDUCO_CMD="dvtm -m ^b" abduco -c demo
2016-01-07 23:50:47 +01:00
Marc André Tanner 598fdc396f Print session list if neither action nor session name was given
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
2016-01-07 23:50:42 +01:00
Marc André Tanner f7b65db3ca Make cursor visible after client termination
For complex interactive application it is recommended to run them
under dvtm as in:

 $ abduco -c demo dvtm [your-fancy-app]
2016-01-07 13:26:02 +01:00
Marc André Tanner 4d80fccaa4 Remove trailing white spaces - no functional changes 2016-01-06 17:23:41 +01:00
Marc André Tanner a64c6a7dd1 Add some debugging instructions to README 2016-01-06 17:18:45 +01:00
Marc André Tanner 160de0ceb7 Print protocol attach flags in debug output 2016-01-06 17:18:44 +01:00
Marc André Tanner 3e9a3fdf4d Make socket directory location configurable via config.def.h
Introduce $ABDUCO_SOCKET_DIR environment variable to set a
default location.
2016-01-06 17:18:44 +01:00
Marc André Tanner 21dd6ad6b7 Update year in copyright clause 2016-01-03 12:07:57 +01:00
Marc André Tanner 7e4802e6c1 Update test suite to match new dvtm termination key sequence 2016-01-03 12:03:15 +01:00
Marc André Tanner 577ae6ae7a Slightly tweek communication protocol for -l option 2016-01-03 12:03:02 +01:00
Marc André Tanner 75dc9a52fa Update usage message to include -l option 2016-01-03 12:02:39 +01:00
Luke Clifton 1fcd6e4f44 Added -l option to move clients to the bottom of the stack.
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.
2016-01-02 20:01:03 +00:00
Marc André Tanner c0cb653e76 Properly indent shell commands in README to make markdown happy 2015-10-15 00:12:59 +02:00
Marc André Tanner a61e88767c Mention socat(1) as a way to provide read only sessions 2015-10-14 23:48:36 +02:00
Marc André Tanner 57e7acba69 Display more meaningful time in session list
Due to the stale session detection logic we will always access
the socket thus essentially printing the current time which
does not seem useful.
2015-08-09 10:36:47 +02:00
David Phillips e08d7acc3a Allow squashing of command line flags together 2015-08-07 17:01:47 +02:00