aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-02 22:25:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-02 22:25:14 +0000
commitad26914631f1882eb614bef836ee796438949cdd (patch)
tree4f989a127947c12e02c4b1f4662171c7c59e0240 /scripts
parentmain: pre-allocate fonts (diff)
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).
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions