Added signal handler that deletes shared memory