Commit graph

11 commits

Author SHA1 Message Date
Daniel Eklöf
b2f72d470a
client: add missing break after handling -t,--term 2019-12-14 13:07:33 +01:00
Daniel Eklöf
4102f9d478
client: add 's:' to the list of recognized short options 2019-12-14 13:07:19 +01:00
Daniel Eklöf
c0a9cf7767
client: initialize/deinitialize the logging system 2019-12-14 13:01:21 +01:00
Daniel Eklöf
c5875bf97c
client: add -s,--server-socket command line option
This allows the user to override the default
path (XDG_RUNTIME_DIR/foot.sock) we try to connect to.
2019-12-14 13:00:48 +01:00
Daniel Eklöf
9abc5ca971
server/client: harden reading of initialization data, and make async
* Client terminal initialization data is now received
  asynchronously. To facilitate this, a couple of minor changes to the
  protocol was made:
    - The client now starts with sending a 4-byte unsigned integer
      with the *total* size of the initialization data (*not*
      including the size field itself.
    - Strings (TERM variable + argv) are now sent NULL-terminated

* The server allocates a single buffer, and fills it
  asynchronously. When full (as indicated by the initial 'total size'
  integer), we parse it (taking care not to read outside boundaries
  etc, and verifies the lengths (of the TERM variable and argv array)
  indicated by the client matches the actual lengths of the strings
  received.

* The server now ignores 'unexpected' data received from the client,
  after the terminal has been instantiated.
2019-11-05 10:08:30 +01:00
Daniel Eklöf
17024b4431
client: bug: verify argv was sent correctly
We checked we had written 2 bytes (sizeof(len)), not <len> bytes.
2019-11-02 00:01:16 +01:00
Daniel Eklöf
570b3ac25a
client: add debug logging of argc/argv 2019-11-02 00:01:08 +01:00
Daniel Eklöf
2544e93c0e
client: register signal handler for SIGTERM too 2019-11-01 21:13:37 +01:00
Daniel Eklöf
438d6eaff0
client/server: add -t,--term to footclient 2019-11-01 21:10:47 +01:00
Daniel Eklöf
77ea7fc61c
client: add long options for --verbose and --help 2019-11-01 20:50:00 +01:00
Daniel Eklöf
6637c8aeda
client: a standalone binary that connects to a foot --server 2019-11-01 20:39:34 +01:00