Commit graph

12 commits

Author SHA1 Message Date
Daniel Eklöf
b4c810cf50
Merge branch 'master' into async-ptmx 2019-11-03 01:14:48 +01:00
Daniel Eklöf
8d9ad96b52
server: FD_CLOEXEC is a file descriptor flag, not a file status flag 2019-11-03 01:11:02 +01:00
Daniel Eklöf
79c3121aa3
misc: fdm already logs failures 2019-11-03 00:52:24 +01:00
Daniel Eklöf
1543c71f78
server: server_destroy(): unlink UNIX socket 2019-11-02 23:32:13 +01:00
Daniel Eklöf
ad26914631
server: use a non-blocking socket when trying to connect
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).
2019-11-02 23:25:14 +01:00
Daniel Eklöf
338747dc5a
server: don't get stuck in read() if TERM length is 0 2019-11-02 12:17:30 +01:00
Daniel Eklöf
a1ba4cb010
server: don't get stuck in read() if length of argv argument is 0 2019-11-02 12:16:50 +01:00
Daniel Eklöf
035ace33b6
server: purge shm buffers when terminal is destroyed 2019-11-02 00:49:25 +01:00
Daniel Eklöf
19c099236b
server: add debug logging of client argc/argv 2019-11-02 00:00:31 +01:00
Daniel Eklöf
438d6eaff0
client/server: add -t,--term to footclient 2019-11-01 21:10:47 +01:00
Daniel Eklöf
0bd2ddd8ad
term_init(): initialize slave TERM from term_init() argument 2019-11-01 21:03:08 +01:00
Daniel Eklöf
a1efd65746
server: implement a --server mode
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.
2019-11-01 20:39:09 +01:00