]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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)
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.


No differences found