Commit 85488e5b authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Neuter the perltie stuff under perl 5.8 since it does not work properly.

I got close to getting it to work by adding this:

	sub FILENO  { my $this = shift; fileno($$this) }
	sub CLOSE   { my $this = shift; close($$this) }

	sub OPEN {
	    my $this = shift;

	    close($$this) if defined(fileno($$this));
	    @_ == 1 ? open($$this, $_[0]) : open($$this, $_[0], $_[1]);
	}

But subprocesses were not seeing the right stdout/stderr after doing
something like:

	open(STDERR, ">> $logname");
	open(STDOUT, ">> $logname");

So, I will let Kevin work on it; I've spent too much time on it
already!
parent 271a989a
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# Copyright (c) 2005, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -701,9 +701,9 @@ sub tblog_start_capture( ;@ ) {
@what = qw(stdout stderr die warn) unless @what;
foreach (@what) {
if ($_ eq 'stdout') {
tie *STDOUT, 'libtblog', \*SOUT;
tie *STDOUT, 'libtblog', \*SOUT if ($] < 5.006);
} elsif ($_ eq 'stderr') {
tie *STDERR, 'libtblog', \*SERR;
tie *STDERR, 'libtblog', \*SERR if ($] < 5.006);
} elsif ($_ eq 'die') {
# Should not need to worry about parser errors since the
# handlers will be set only after parsing is done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment