mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Fix #440: refactor systemd and s6 readiness notifcation
This patch fixes issue #440 which details how systemd readiness notification has been broken since its inception in Finit. In addition to now providing a proper abstract socket, the refactor also drops the reliance on the Finit client API to fetch a socket. Now an s6 descriptor is the write end of a pipe() and the systemd socket is instead created before forking off the service. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
6 files changed
+102
-48
No files matched your search
@@ -97,16 +97,6 @@ int client_request(struct init_request *rq, ssize_t len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Exception, only command that don't need to wait for a
|
||||
* response from Finit. Registers the client socket as a
|
||||
* readiness notification socket with Finit
|
||||
*/
|
||||
if (rq->cmd == INIT_CMD_NOTIFY_SOCKET) {
|
||||
rq->cmd = INIT_CMD_ACK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
pfd.fd = sd;
|
||||
pfd.events = POLLIN | POLLERR | POLLHUP;
|
||||
if ((rc = poll(&pfd, 1, REQUEST_TIMEOUT)) <= 0) {
|
||||
|
||||
Reference in new issue
Block a user