Yeah - I agree, I don't like the default behavior of subprocess.run either. As another commenter pointed out, passing the check=True argument makes subprocess.run raise an Exception if the underlying command doesn't return 0 (would have been nice if this was the default).
Those are two good use cases (using the lower level subprocess.Popen + process group signaling) that the book does not cover---thanks for bringing them up.
Those are two good use cases (using the lower level subprocess.Popen + process group signaling) that the book does not cover---thanks for bringing them up.