diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-11-26 17:23:19 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-11-26 18:00:04 +0100 |
| commit | f0e87e3af9b64f5f5d96296a3baac62a1d2f8632 (patch) | |
| tree | c35f9411e4851e9a64188bdd4934eff874e6c985 /ui-curses.c | |
| parent | f42a3165e8b527a81865870f74865c1cd99b7196 (diff) | |
| download | vis-f0e87e3af9b64f5f5d96296a3baac62a1d2f8632.tar.gz vis-f0e87e3af9b64f5f5d96296a3baac62a1d2f8632.tar.xz | |
vis: redirect stdout and stderr streams to /dev/null when lacking a consumer
If the caller of vis_pipe is not interested in the output, redirect it
to /dev/null and close the pipe. Otherwise we would wait for possible
output (which might never arrive) only to throw it away.
As a consequence background processes can now be started with:
:> { plumber <&3 3<&- & } 3<&0 2>&-
whereas before one also had to explicitly close stdout:
:> { plumber <&3 3<&- & } 3<&0 1>&- 2>&-
Diffstat (limited to 'ui-curses.c')
0 files changed, 0 insertions, 0 deletions
