main: fork(child1); fork(child2); # endless loop until signal caught from # shell (child1): loop(true) { check child1 # call sub reacting from input; check child2 # call sub reacting from input; } # loop until a signal is caught. END main: