Avoid subprocess.Popen with stdout/stderr=PIPE and wait() usage
authorMichael Prokop <mika@grml.org>
Tue, 15 Oct 2019 10:07:07 +0000 (12:07 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 15 Oct 2019 10:12:13 +0000 (12:12 +0200)
commit29d54d4a9505cf92bae9fc4ba24b6253bdadedc9
treeff7cb4fcf08f05df75b20546c5ad7c7fb627f96c
parentdbbca970b2878bdb1882a83a5ab30d97727d2590
Avoid subprocess.Popen with stdout/stderr=PIPE and wait() usage

Quoting from https://docs.python.org/2/library/subprocess.html#popen-objects:

| Popen.wait()
|   Wait for child process to terminate. Set and return returncode attribute.
|
|   Warning
|   This will deadlock when using stdout=PIPE and/or stderr=PIPE and the child
|   process generates enough output to a pipe such that it blocks waiting for the
|   OS pipe buffer to accept more data. Use communicate() to avoid that.

While modprobe isn't expected to ever output enough output to be
relevant, let's better be safe than sorry.

While at it fix typo (it's -> its)

Closes grml/grml2usb#21
grml2usb