Revert "Enhance the dup-dance in wt-status to work around t7502-commit.sh hang"

This reverts commit 8f4e9dca13.

We'll instead take the solution from mingw/master with the
next merge.
This commit is contained in:
Steffen Prohaska
2007-12-16 23:01:37 +01:00
parent 8f4e9dca13
commit 28456eeb0e

View File

@@ -321,17 +321,15 @@ static void wt_status_print_untracked(struct wt_status *s)
static void wt_status_print_verbose(struct wt_status *s)
{
struct rev_info rev;
int saved_stdout, redirected_stdout;
int saved_stdout;
fflush(s->fp);
/* Sigh, the entire diff machinery is hardcoded to output to
* stdout. Do the dup-dance...*/
saved_stdout = dup(STDOUT_FILENO);
redirected_stdout = dup(fileno(s->fp));
if (saved_stdout < 0 || dup2(redirected_stdout, STDOUT_FILENO) < 0)
if (saved_stdout < 0 ||dup2(fileno(s->fp), STDOUT_FILENO) < 0)
die("couldn't redirect stdout\n");
close(redirected_stdout);
init_revisions(&rev, NULL);
setup_revisions(0, NULL, &rev, s->reference);