Spawn subshell for SSH and continue with program flow

前端 未结 7 1151
别那么骄傲
别那么骄傲 2020-12-19 16:28

I\'m trying to write a shell script that automates certain startup tasks based on my location (home/campusA/campusB). I go to University and take classes in two different ca

7条回答
  •  误落风尘
    2020-12-19 16:41

    You may want to try to double background myProg2 to detach it from the tty:

    # cf. "Wizard Boot Camp, Part Six: Daemons & Subshells",
    # http://www.linux-mag.com/id/5981
    (myProg2 &) &
    

    Another option may be to use the daemon tool from the libslack package:

    http://ingvar.blog.linpro.no/2009/05/18/todays-sysadmin-tip-using-libslack-daemon-to-daemonize-a-script/

提交回复
热议问题