Fix output redirection of exec_prerun/_postrun
authorhannesweisbach <hannesweisbach@users.noreply.github.com>
Tue, 29 Oct 2019 07:35:24 +0000 (08:35 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2019 07:35:24 +0000 (08:35 +0100)
commit321d0c079230cbd447a8456db24ecd7eb2fd1be4
tree930b6428732d3ba5bc0ab1743e798676ae03ce7d
parentc656b9056e45f9acd1d374a85c5becf7cc6a00ca
Fix output redirection of exec_prerun/_postrun

The previous version used the bashism "&>" to redirect stdout and stderr of the prerun/postrun commands to an output file. Since system() executes the command using "/bin/sh sh -c …". If /bin/sh is not bash, this wont work.
Use the "posixly-correct" way of redirecting stdout to the output file and then redirect stderr to stdout.

Signed-off-by: Hannes Weisbach <hannes.weisbach@gmail.com>
backend.c