stop when stdin dries up