Skip to content

Main idea is create a subprocess to run the real job. the main process monitor it, restart it if err happen, or kill it after a while. Add what ever you what from this idea.

Notifications You must be signed in to change notification settings

Petelin/restart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restart

go install

https://github.com/Petelin/restart

use in command

go install github.com/Petelin/restart/restart

then use restart "<bash command>"

this is equal to run bash -c "<bash command>" but with auto restart if command exit.

What is it?

Main idea is create a subprocess to run the real job. the main process monitor it, restart it if err happen, or kill it after a while. Add what ever you what from this idea.

Why we need this?

we all know write a nevery stoped program is almost impossiple. if we can promiss our program(like a spider) can work for a wheal, then we restart it if it crash, that will make us happy.

If you want more, you can use something else like supervisor

but i just want a simple main bin file.

Add feature your self. like ......

You can write a Runxxx function, i like to merge your RP. enjoy!

About

Main idea is create a subprocess to run the real job. the main process monitor it, restart it if err happen, or kill it after a while. Add what ever you what from this idea.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages