sisungo / airup

🚀 Airup is a modern, portable and blazingly fast implementation of service supervisor and the init daemon.
MIT License
18 stars 1 forks source link

[BUG] Implementation of `exec.post-stop` is not working as expected #4

Closed sisungo closed 1 year ago

sisungo commented 1 year ago

Current implementation of exec.post-stop creates a task at airupd/src/supervisor/task/cleanup_task.rs. This means stop_service() is returned before exec.post-stop is called, and then a task is created.

This causes implementations of some functions more complex, and exec.post-stop of oneshot services are never executed.

sisungo commented 1 year ago

On failure it should create a new task to cleanup, and on retry it should create a new task by task_type of StartService. On StopService, it should be executed in-the-task, not creating a new task.

sisungo commented 1 year ago

Fixed.