- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Perl untie problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 02:07 AM
тАО07-28-2005 02:07 AM
I just got an error from my perl-program, but since I have never used tie/untie, I don't know what to do first.
miniserv.pl: untie attempted while 1 inner references still exist at /opt/perl5/lib/5.8.6/IPC/Open3.pm line 203.
I looked at the line 203 and I found:
my $kid_rdr = gensym;
my $kid_wtr = gensym;
my $kid_err = gensym;
xpipe $kid_rdr, $dad_wtr if !$dup_wtr;
xpipe $dad_rdr, $kid_wtr if !$dup_rdr;
xpipe $dad_err, $kid_err if !$dup_err && $dad_err ne $dad_rdr;
$kidpid = $do_spawn ? -1 : xfork;
if ($kidpid == 0) { # Kid
# A tie in the parent should not be allowed to cause problems.
untie *STDIN;
untie *STDOUT; #this is line 203!!
Could anybody tell me how to find the variable, that is still tied? I couldn't find much bei Google...
Danke!
Solved! Go to Solution.
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 02:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 08:32 PM
тАО07-28-2005 08:32 PM
Re: Perl untie problem
What do U mean?
This is actually the source of the IPC::Open3 module Open3.pm
close didn't work unfortunately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 09:01 PM
тАО07-28-2005 09:01 PM
Re: Perl untie problem
I wouldn't expect the IPC::Open3 module to be broken.
It rather looks that either a prerequisite isn't fulfilled, or it was used improperly.
Can you identify the line where your Perl code aborted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 10:49 PM
тАО07-28-2005 10:49 PM
Re: Perl untie problem
As I couldn't make RRDs module from RRDtool working on hp-ux, I rewrote my script for use with RRDp, and since than I get this errormsg. In the miniserv.pl there is a tie to STDIN and STDOUT,
eval {
package main;
tie(*STDOUT, 'miniserv');
tie(*STDIN, 'miniserv');
do $miniserv::full;
die $@ if ($@);
};
but I don't know how to find out what and where fails..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 11:05 PM
тАО07-28-2005 11:05 PM
Re: Perl untie problem
package main;
tie(*STDOUT, 'miniserv');
tie(*STDIN, 'miniserv');
do $miniserv::full;
untie *STDOUT; # <--
untie *STDIN; # <--
die $@ if ($@);
};
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 11:41 PM
тАО07-28-2005 11:41 PM
Re: Perl untie problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2005 12:32 AM
тАО07-29-2005 12:32 AM
Re: Perl untie problem
as you are.
I guess this is more for the advanced Perl hackers like procura.
So far I've only used tied hashes as they are used easiest of all.
As far as my memory serves me correctly one has to implement for each valid operation on the thingy (i.e. scalar, array, hash, filehandle, object reference) a method in order for tying to work.
Maybe you need to override the close method for the filehandle tie?
Have you consulted perldoc perltie yet?
You could also look at the code from your Perl installation to get an idea how implementation of tied variables works.
I'd say a pretty easy one to start with was Config.pm, though it's tying a hash rather than a file handle.
Anyway, have a look at "perldoc -m Config"