Pserver gracefully shutdown, catch INT signal and do clean up.
Created by: typhoonzero
Find a way to gracefully shutdown pservers and masters, like catch "INT" signal.
Trainers do not need this because trainers will exit when training is finished. But pservers and master act like a "daemon process".