Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Execution

Projects dedicated to:

  • Executing and controlling execution of processes
  • Affecting running processes

List of projects in this directory:

Usage

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 run
      • args - Arguments for the process
    • Returns:
      • Message(s) with exit code of the process

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

Testing

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.sh

This commend provides read, write and execute permissions for that file.