Removed getchar() from Server and Agent main. Server and Agent can be correctly stopped by sending SIGUSR1 to them (kill -s 10 PID)