/* stderr.c --- capturing stdout/stderr output onto the screensaver window.
- * xscreensaver, Copyright (c) 1991-1998 Jamie Zawinski <jwz@netscape.com>
+ * xscreensaver, Copyright (c) 1991-1998 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
int stdout_fd = 1;
int stderr_fd = 2;
int flags = 0;
- Boolean stderr_dialog_p, stdout_dialog_p;
+ Boolean stderr_dialog_p;
if (done) return;
done = True;
real_stdout = stdout;
stderr_dialog_p = get_boolean_resource ("captureStderr", "Boolean");
- stdout_dialog_p = get_boolean_resource ("captureStdout", "Boolean");
- if (!stderr_dialog_p && !stdout_dialog_p)
+ if (!stderr_dialog_p)
return;
if (pipe (fds))
if (stderr_dialog_p)
{
FILE *new_stderr_file;
+ FILE *new_stdout_file;
+
new_stderr = dup (stderr_fd);
if (new_stderr < 0)
{
perror ("could not dup() a new stderr:");
return;
}
- }
- if (stdout_dialog_p)
- {
- FILE *new_stdout_file;
+
new_stdout = dup (stdout_fd);
if (new_stdout < 0)
{