perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donovan Allen <>
Subject Re: Problems using IPC::Open3 & IPC::Run3
Date Mon, 07 Jul 2003 22:17:57 GMT
I have never had problems after doing the untie.

My premise as to why this seems to be an ok thing to do is:
* If you modify the work around code to some sort of debug output everytime
$tie_stdin is defined, you will see that STDIN gets tied by mod_perl every
* Also, my assumption is that the tied STDIN has already served its purpose for
the request by the time we get to the embperl scripts.  This could be incorrect,
but I have not had anything break because of it.

I am lazy, so as long as something isn't broken and seems to be working as
intended, I generally stop fiddling with it unless I am looking for trouble.

It might be possible to create a protected copy of STDIN, but I did a quick
duplicate protection test and it seems that the duplicated handle is not tied, so
something is amiss and protecting tied filehandles may not be possible...then
laziness kicked in. :-)

Ultimately, the mod_perl maintainers may be a better source for more details and
explanations, since they broke STDIN in the first place.

Then again, if you ask me, the mod_perl maintainers should also do more or less
one of the following:
  a> create their own duped STDIN to tie and mangle
  b> fix the tie code to handle all the common downstream STDIN uses
  c> or untie it if they are done with it so we don't have to guess, worry, and/or
dig around for answers to potentially harmless concerns.

Donovan Allen

Stefan Cars wrote:

> Okey but shouldn't i tie it back some how ?
> /S
> On Sat, 5 Jul 2003, Donovan Allen wrote:
> > Found this somewhere back when this bug first appeared in mod_perl:
> >
> > # work-around for mod_perl
> > my $tie_stdin = tied *STDIN;
> > untie *STDIN if $tie_stdin;
> >
> > # insert open2() or open3() statement after the above
> >
> > Gerald,
> >
> > It is a mod_perl bug, but I would consider putting it in the FAQ.  Would
> > probably be very helpful to people.
> >
> > Gerald Richter wrote:
> >
> >  Is there anyway to use IPC::Open3 or anything like it or is there another
> > module doing the same thing which can be used with embperl ?
> >
> >
> >
> >  Sorry, I don't know a solution. Maybe you can find something in the modperl
> > guide ( or go ask on the modperl mailing list
> >
> > Gerald
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> >
> >
> >

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message