by d0mine · 5y ago · 0 comments
Would it make it too advanced to show subprocess.Popen example with stdin=PIPE for providing input instead of writing to disk? Or an example on how to force timeout for a command that might spawn its own child processes (send signal to a process group).
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.
if you run those commands in bash with `set -e` then the script will exit early when a command exits non-zero.
I often run: `set -euo noglob -o pipefail` which is a way of preventing cascading catastrophes with bash scripts.