Properly communicate write-end shutdown when encountered EOF by stdin.