Tomas Volf <~@wolfsden.cz> skribis:

> Actually, now that I think about it, why are formal arguments for the
> restart lambda `(running . args)'?  For example status has just `(_)'.
> Neither `running' nor `args' are used in the lambda itself.
>
> Changing the formal arguments to simply _ would get us the same behavior
> you get when you try to invoke e.g. status action with multiple
> arguments (an error).

I think it’s a bug.  Back in the day (commit
a84ecf34be2a35e8b068d4232d8932acc5986c33) would pass those extra
arguments to ‘start’:

--8<---------------cut here---------------start------------->8---
      ((restart)
       (lambda (running . args)
         (if running
             (stop obj)
             (local-output "~a was not running." (canonical-name obj)))
         (start obj args)))
--8<---------------cut here---------------end--------------->8---

Which is consistent and should probably be restored.

That way, we’d get an error when restarting services that take no
arguments.

Ludo’.



Reply via email to