Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restart only when exit unexpected #271

Open
lfxx opened this issue Jan 4, 2024 · 6 comments
Open

restart only when exit unexpected #271

lfxx opened this issue Jan 4, 2024 · 6 comments
Labels
C-dinit-service Things about dinit-service Feature Request Request a feature to be added to dinit Help wanted It's needs community help

Comments

@lfxx
Copy link

lfxx commented Jan 4, 2024

Can Dinit implement a functionality similar to Supervisor's automatic restart on abnormal exit?
Specifically,
1.when the program exits with a status code not present in the exitcode list, it should be considered an abnormal exit, triggering an automatic restart.
2.If the program exits normally with a status code within the exitcode list, no automatic restart is needed.
Currently, Dinit automatically restarts in all situations, which is not very convenient.

@davmac314
Copy link
Owner

What is your exact use case (i.e. why do you actually need this)? Normally feature requests aren't accepted without a patch (see the README)

@lfxx
Copy link
Author

lfxx commented Jan 4, 2024

What is your exact use case (i.e. why do you actually need this)? Normally feature requests aren't accepted without a patch (see the README)

Thanks for replying.I have a program that has some bugs, and it occasionally crashes during execution. I use dinit to restart it and continue running when this happens. However, after the program runs successfully, I don't want it to be restarted continuously. I used to achieve this functionality with supervisor, but I couldn't find a way to do it in dinit.

@lfxx
Copy link
Author

lfxx commented Jan 4, 2024

Dinit has almost all the functionalities of supervisor and is very convenient to use. I have fully transitioned to using dinit in our production environment, and I prefer not to go back to supervisor. It would be great if the functionality I mentioned earlier could be implemented in dinit.

@davmac314
Copy link
Owner

I won't be prioritising this, but it'd be easy enough to do (with a new service option). We can leave the issue open and maybe someone will pick it up.

@lfxx
Copy link
Author

lfxx commented Jan 4, 2024

I won't be prioritising this, but it'd be easy enough to do (with a new service option). We can leave the issue open and maybe someone will pick it up.

Ok.Could you please tag this issue? It would increase the likelihood of someone picking up this issue. Thank you.

@davmac314 davmac314 added Enhancement/New Feature Improving things or introduce new feature C-dinit-service Things about dinit-service Feature Request Request a feature to be added to dinit Help wanted It's needs community help labels Jan 4, 2024
@davmac314
Copy link
Owner

@mobin-2008 feel free to adjust the labels if you think it's needed

@mobin-2008 mobin-2008 removed the Enhancement/New Feature Improving things or introduce new feature label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-dinit-service Things about dinit-service Feature Request Request a feature to be added to dinit Help wanted It's needs community help
Projects
None yet
Development

No branches or pull requests

3 participants