]> git.tuebingen.mpg.de Git - paraslash.git/commit
gui: Also display command's stderr output.
authorAndre Noll <maan@systemlinux.org>
Tue, 13 Mar 2012 21:17:18 +0000 (22:17 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 18 Mar 2012 20:10:09 +0000 (21:10 +0100)
commit742f9cee2e64f2360e6adecc99426c69a34c147d
tree7ce45a263499f5fd40480db5e248931f544d2681
parentd0d27cfa56d05eaa0e5567c75adfe606eab2957e
gui: Also display command's stderr output.

Currently, both para_cmd() and display_cmd() redirect stderr to
/dev/null, so any error messages of the command being executed do
not make it to the bottom window. This is inconvenient at times,
and makes debugging hard.

This patch prints the stderr output in the bottom window using
COLOR_ERRMSG.

As for the implementation, the global command_pipe integer
variable becomes an integer array of length two which contains
the two file descriptors for stdout and stderr. We also need two
buffers in do_select(), so command_buf becomes a two-dimensional
array. do_select() now has to monitor two file descriptors per command
and it returns only after the peer has closed both fds.
gui.c