Home:ALL Converter>How to restart program after interruption?

How to restart program after interruption?

Ask Time:2016-03-17T00:43:48         Author:A. T

Json Formatter

How can I start my program again after interruption and kill the previous process? What I have to write in my function? Or maybe another way to restart program in itself exists?

this_program.sh:

trap 'mySig' SIGINT
mySig()
{
        ./this_program.sh
}

Author:A. T,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/36041850/how-to-restart-program-after-interruption
yy