rm unused var
rm unused var, new order of shutdown in signal_handler, unregister ports