in reply to Calling and catching a trigger

that sort of architecture is typically but not always quite messy. instead design a third program, which has a proper interface to be a controller of sorts. that way you can get some sanity
the hardest line to type correctly is: stty erase ^H