posix has getline, so we can use it.