The till program reads the variable TILL_MODE from its environment. Use bash -c as a stand-in for the till program, to see what a child gets.