diff options
| author | Simon Ser <contact@emersion.fr> | 2023-10-05 17:11:03 +0200 |
|---|---|---|
| committer | Kenny Levinsen <kl@kl.wtf> | 2023-10-06 13:03:07 +0200 |
| commit | f692ee00757d38022d0f634e6c41072cf4814d1b (patch) | |
| tree | e4a8a4ac33e86ac3b3daf889420975ca716692a3 /main.c | |
| parent | 10df946671a12b4c0f4c13d4556a8bae6fc30394 (diff) | |
Don't send READY=1 for readiness notifications
Just send a singular newline like s6 expects.
systemd doesn't support spawning a process with an FD to send
readiness notifications to, instead it provides a socket name. IOW,
this cannot be used directly with systemd after all.
Closes: https://github.com/swaywm/swaylock/issues/312
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1251,10 +1251,7 @@ int main(int argc, char **argv) { } if (state.args.ready_fd >= 0) { - // s6 wants a newline and ignores any text before that, systemd wants - // READY=1, so use the least common denominator - const char ready_str[] = "READY=1\n"; - if (write(state.args.ready_fd, ready_str, strlen(ready_str)) != strlen(ready_str)) { + if (write(state.args.ready_fd, "\n", 1) != 1) { swaylock_log(LOG_ERROR, "Failed to send readiness notification"); return 2; } |
