diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index d5e36e8a..3f975b99 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -182,6 +182,9 @@ All relevant changes are documented in this file. - Fix `initctl stop` of a forking service before it had written its PID file. The PID file showing up later undid the stop and the service was reported running. Now the late daemon is stopped instead +- Fix `reboot`, `halt`, and `poweroff` being refused by Finit over the + initctl socket, although carried out. The commands then also fell + back to signalling PID 1 - Fix a command whose name starts like a service option, e.g. `logger` or `pidof`. It was taken as the `log` or `pid` option and the next argument ran as the command, which also broke the `logger` example in finit.conf(5) diff --git a/src/api.c b/src/api.c index dd50a756..145eba38 100644 --- a/src/api.c +++ b/src/api.c @@ -244,7 +244,7 @@ static int do_reboot(int cmd, int timeout, char *buf, size_t len) case INIT_CMD_REBOOT: case INIT_CMD_HALT: case INIT_CMD_POWEROFF: - shutdown_now(cmd, timeout); + rc = shutdown_now(cmd, timeout); break; case INIT_CMD_SUSPEND: