Projects dedicated to:
- Executing and controlling execution of processes
- Affecting running processes
List of projects in this directory:
restart_process.sh- Run process and restart it if it exits with an error
Script that runs a process and restarts it if it exits with an error.
General usage:
bash restart_process.sh <process> <args>Methods:
restart_process- Run process and restart it if it exits with an error- Arguments:
process- Process to runargs- Arguments for the process
- Returns:
- Message(s) with exit code of the
process
- Message(s) with exit code of the
- Arguments:
Use cases:
-
Restart until success from terminal:
bash restart_process.sh bash error_process.sh
or
bash restart_process.sh python error_process.py
-
Restart until success in a script:
source restart_process.sh restart_process bash error_process.sh
You can find example scripts to test the functionality of the execution projects in the testing directory.
If you run into permission problems for any of the bash testing scripts, simply run:
chmod a=rwx path/to/script.shThis commend provides read, write and execute permissions for that file.