@kacfengine - should we put this function in signals.[ch] and save every agent's main the need to define essentially the same thing over and over again ?