block until exit