Unbreak restart under Linux-like OS