mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst-inspect: Pipe stderr to pager as well
If stderr is not redirected by the user, also page that.
This commit is contained in:
parent
cf3fdbe4c0
commit
ef58a84571
1 changed files with 4 additions and 0 deletions
|
@ -1752,6 +1752,8 @@ redirect_stdout (void)
|
||||||
} else {
|
} else {
|
||||||
close (pipefd[0]);
|
close (pipefd[0]);
|
||||||
dup2 (pipefd[1], STDOUT_FILENO);
|
dup2 (pipefd[1], STDOUT_FILENO);
|
||||||
|
if (isatty (STDERR_FILENO))
|
||||||
|
dup2 (pipefd[1], STDERR_FILENO);
|
||||||
close (pipefd[1]);
|
close (pipefd[1]);
|
||||||
close (STDIN_FILENO);
|
close (STDIN_FILENO);
|
||||||
}
|
}
|
||||||
|
@ -1952,8 +1954,10 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
fflush (stderr);
|
||||||
/* So that the pipe we create in redirect_stdout() is closed */
|
/* So that the pipe we create in redirect_stdout() is closed */
|
||||||
close (STDOUT_FILENO);
|
close (STDOUT_FILENO);
|
||||||
|
close (STDERR_FILENO);
|
||||||
wait (NULL);
|
wait (NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue