ctrl+D/EOF support for graceful pyfup shutdown.