| Commit message (Collapse) | Author | Age | Lines | |
|---|---|---|---|---|
| * | server: verify CWD string length matches the indicated length | Daniel Eklöf | 2019-12-21 | -0/+6 |
| | | ||||
| * | server: move forward the indicated number of TERM bytes | Daniel Eklöf | 2019-12-21 | -1/+1 |
| | | ||||
| * | server: bug: move forward 2 bytes, not whatever the client sent | Daniel Eklöf | 2019-12-21 | -1/+1 |
| | | ||||
| * | term: term_init: add 'cwd' argument | Daniel Eklöf | 2019-12-21 | -1/+1 |
| | | | | | | | | | | | This is used when spawning the slave, to set its current working directory just before we exec() the client. In a regular foot instance, we set the cwd from getcwd(). In a foot server instance, each connecting client sends its cwd to the server, and we use that. | |||
| * | client/server: client sends its CWD to server | Daniel Eklöf | 2019-12-21 | -1/+8 |
| | | ||||
| * | term: term_spawn_new: always spawn foot/footclient from PATH | Daniel Eklöf | 2019-12-21 | -1/+1 |
| | | ||||
| * | term: term_spawn_new(): new function, spawns a new foot/footclient process | Daniel Eklöf | 2019-12-21 | -1/+1 |
| | | | | | Bind ctrl+shift+return to it | |||
| * | server: use socket-path from config | Daniel Eklöf | 2019-12-14 | -19/+2 |
| | | ||||
| * | server: log socket packet | Daniel Eklöf | 2019-12-13 | -1/+3 |
| | | ||||
| * | Add missing includes | Daniel Eklöf | 2019-12-01 | -0/+1 |
| | | ||||
| * | tllist: is now an external "library", so use <> includes | Daniel Eklöf | 2019-11-17 | -1/+2 |
| | | ||||
| * | server: disable debug output | Daniel Eklöf | 2019-11-05 | -1/+1 |
| | | ||||
| * | server/client: harden reading of initialization data, and make async | Daniel Eklöf | 2019-11-05 | -31/+90 |
| | | | | | | | | | | | | | | | | | | | | | * 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. | |||
| * | server: workaround evil clients | Daniel Eklöf | 2019-11-05 | -0/+6 |
| | | | | | | If the clients attempt to send more data after we've instantiated the terminal, just consume the data but ignore it. | |||
| * | server: don't cache argc/argv in client context | Daniel Eklöf | 2019-11-05 | -17/+18 |
| | | ||||
| * | Remove unneeded include | Daniel Eklöf | 2019-11-03 | -1/+0 |
| | | ||||
| * | server: set CLOEXEC | NONBLOCK directly in socket() call | Daniel Eklöf | 2019-11-03 | -17/+2 |
| | | ||||
| * | Merge branch 'master' into async-ptmx | Daniel Eklöf | 2019-11-03 | -1/+1 |
| |\ | ||||
| | * | server: FD_CLOEXEC is a file descriptor flag, not a file status flag | Daniel Eklöf | 2019-11-03 | -1/+1 |
| | | | ||||
| * | | misc: fdm already logs failures | Daniel Eklöf | 2019-11-02 | -4/+1 |
| |/ | ||||
| * | server: server_destroy(): unlink UNIX socket | Daniel Eklöf | 2019-11-02 | -0/+2 |
| | | ||||
| * | server: use a non-blocking socket when trying to connect | Daniel Eklöf | 2019-11-02 | -4/+23 |
| | | | | | | | | | | | | | | | When checking of a 'foot --server' instance is already running, we try to connect to the UNIX socket we're planning on listening on. In most cases, this will fail hard and fast. But under certain circumstances, we can get stuck in connect() waiting for a connection timeout. Since it should be possible to establish a connection immediately *if* there's someone actually listening on the socket, rely on the fact that connect() will fail with a EINPROGRESS if a connection can *not* be established immediately (and thus no one is listening on it). | |||
| * | server: don't get stuck in read() if TERM length is 0 | Daniel Eklöf | 2019-11-02 | -2/+4 |
| | | ||||
| * | server: don't get stuck in read() if length of argv argument is 0 | Daniel Eklöf | 2019-11-02 | -0/+3 |
| | | ||||
| * | server: purge shm buffers when terminal is destroyed | Daniel Eklöf | 2019-11-01 | -0/+6 |
| | | ||||
| * | server: add debug logging of client argc/argv | Daniel Eklöf | 2019-11-01 | -0/+4 |
| | | ||||
| * | client/server: add -t,--term to footclient | Daniel Eklöf | 2019-11-01 | -1/+15 |
| | | ||||
| * | term_init(): initialize slave TERM from term_init() argument | Daniel Eklöf | 2019-11-01 | -2/+2 |
| | | ||||
| * | server: implement a --server mode | Daniel Eklöf | 2019-11-01 | -0/+310 |
| In this mode, foot listens on a UNIX socket and creates terminal windows when clients connect. A connecting client sends argc/argv to the server, and the server instantiates a new terminal window. When the terminal window is closed, the exit code is sent back to the client. | ||||
