Linguofreak
Well-known member
I'm using a bash script on my Linux machine to manage some helper programs for X-Plane (A joystick-to-keyboard program and a webcam head tracking program, at the moment). I basically want to start these programs up along with X-Plane, and then have them exit when X-Plane exits. So far, I've got something along the lines of:
Is there any better way than killall-ing each program by name to have both programs exit when X-Plane does? I've tried simply putting an exit statement in the script, but that doesn't seem to work.
Code:
program1 &
program2 &
X-Plane
killall -HUP program1 program2
Is there any better way than killall-ing each program by name to have both programs exit when X-Plane does? I've tried simply putting an exit statement in the script, but that doesn't seem to work.