diff options
| author | Max Gautier <mg@max.gautier.name> | 2022-07-29 18:12:47 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-07-30 13:13:56 +0000 |
| commit | ffdac61e2a95aa31a9c69eb5152a7dd79346ddf0 (patch) | |
| tree | af72c93316258d34e4cf8a9cc7a4abccd17983c2 | |
| parent | config: reset errno before calling getline() again (diff) | |
server: Use "normal" socket activation, not inetd
Systemd, when doing socket activation, pass file descriptors in a
non-stable order when there is multiples ones.
But we only use one, so we don't need to identify it, and the file
descriptors always start at 3.
So use 3 for the systemd service.
Source : sd_listen_fds (systemd man pages)
We also need to unset variables systemd pass to socket activated
process, since we don't need them and sub-process (footclient and
theirs forks) could be confused by those.
Closes #1107
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | foot-server@.service.in | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e3cd789..6823e16b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,6 +104,8 @@ * Selection not being cancelled correctly when scrolled out. * Extending a multi-page selection behaving inconsistently. * Poor performance when making very large selections ([#1114][1114]). +* Bogus error message when using systemd socket activation for server + mode ([#1107][1107]) [1055]: https://codeberg.org/dnkl/foot/issues/1055 [1092]: https://codeberg.org/dnkl/foot/issues/1092 @@ -111,6 +113,7 @@ [1111]: https://codeberg.org/dnkl/foot/issues/1111 [1120]: https://codeberg.org/dnkl/foot/issues/1120 [1114]: https://codeberg.org/dnkl/foot/issues/1114 +[1107]: https://codeberg.org/dnkl/foot/issues/1107 ### Security diff --git a/foot-server@.service.in b/foot-server@.service.in index 81c13bb4..c40bb454 100644 --- a/foot-server@.service.in +++ b/foot-server@.service.in @@ -1,8 +1,8 @@ [Service] -ExecStart=@bindir@/foot --server=0 +ExecStart=@bindir@/foot --server=3 Environment=WAYLAND_DISPLAY=%i +UnsetEnvironment=LISTEN_PID LISTEN_FDS LISTEN_FDNAMES NonBlocking=true -StandardInput=socket [Unit] Requires=%N.socket |
