Fix graceful shutdown test on Linux.