Handle signals