be smarter (and safer) about waiting wine processes to end