[12815] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 225 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 22 10:07:18 1999

Date: Thu, 22 Jul 1999 07:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 22 Jul 1999     Volume: 9 Number: 225

Today's topics:
    Re: ****Perl tutorials!!!!**** (John Borwick)
    Re: Array problem (Jimtaylor5)
    Re: Array problem (Andreas Fehr)
    Re: Array problem <gellyfish@gellyfish.com>
    Re: Array problem (Abigail)
        authentication and getting  HTTP_REMOTE_USER <jonratcliffe@email.com>
    Re: basename regexp? <jona@ds10.hobby.nl>
        Compressed data-resources - like java-jars??? <thomas@bibsyst.no>
        concatenate (Dow)
    Re: concatenate <cw@dwc.ch>
        doing an ls in PERL (globbing) (Dow)
        Executing system commands <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
    Re: Fun with Net:NNTP <dgreer@websightsolutions.com>
        Help me ..; databases ... <pcl@dds.nl>
        Help! karsten_beijer@my-deja.com
    Re: how to avoid truncation error? (Bart Lateur)
    Re: index.cgi script help (Abigail)
        No subject was specified. <jona@ds10.hobby.nl>
    Re: No subject was specified. <jona@ds10.hobby.nl>
        Perl CGI vs VB ASP (Eisen Chao)
    Re: Perl CGI vs VB ASP <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
    Re: problem with <input type="image"..... <rhrh@hotmail.com>
    Re: Returning file handle from a subroutine <mikecard@my-deja.com>
    Re: Scrollback perldoc in DOS-window? <murf@perftech.com>
    Re: Server NT et Perl <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
    Re: setuid and opening a file for writing (John Borwick)
    Re: SSI in Perl CGI output <ftns@hotmail.com>
    Re: waitpid crashes perl <Philip_Dye@norstanconsult.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 22 Jul 1999 13:28:22 GMT
From: John.Borwick@sas.com (John Borwick)
Subject: Re: ****Perl tutorials!!!!****
Message-Id: <37a01be3.263737474@newshost.unx.sas.com>

On Thu, 22 Jul 1999 03:42:38 GMT, Floyd Morrissette
<Webdesigner@NewWebSite.com> wrote:

>In article <1dvb92n.4s4d519ccu2oN@p37.tc17.metro.ma.tiac.com>,
>  rjk@linguist.dartmouth.edu (Ronald J Kimball) wrote:
>Works with IE. Obviously one of those pages for IE only. They have
>alienated about half the Internet world.

well i had to try it in ye old lynx...

I got the "Bad HTML!!" message, which made me very proud.

there aren't any <IMG ALT="text"> tags so I couldn't tell that I was
about to be redirected to amazon.com to make this guy some money..
when i saw the name i ctrl+C'd asap.

i like the "learn Perl in 10 minutes" page.  ha ha.  i think it's
weird that so many people start of reading an entire file into an
array instead of looping with while.

-- 
John Borwick


------------------------------

Date: 22 Jul 1999 12:05:43 GMT
From: jimtaylor5@aol.com (Jimtaylor5)
Subject: Re: Array problem
Message-Id: <19990722080543.03340.00000726@ng-fx1.aol.com>

>
>The above code doesn't contain any array. If you know what arrays are,
>as opposed to lists, the answer suddenly is trivial:
>
>   @array = split /\|/ => $line;
>

Duh.. Which still doesn't answer my original question of how I would get the
list into variables without knowing how many there are.


------------------------------

Date: Thu, 22 Jul 1999 12:44:53 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Array problem
Message-Id: <37971233.26692221@news.uniplus.ch>

On 22 Jul 1999 12:03:42 GMT, jimtaylor5@aol.com (Jimtaylor5) wrote:

>But what is ... blah, and I still don't understand how I would get those items
>from the list into my program without knowing how many there are. maybe I'm
>missing something..

Did you try it?

Andreas


------------------------------

Date: 22 Jul 1999 14:09:39 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Array problem
Message-Id: <37971813@newsread3.dircon.co.uk>

Jimtaylor5 <jimtaylor5@aol.com> wrote:
>>
>>The above code doesn't contain any array. If you know what arrays are,
>>as opposed to lists, the answer suddenly is trivial:
>>
>>   @array = split /\|/ => $line;
>>
> 
> Duh.. Which still doesn't answer my original question of how I would get the
> list into variables without knowing how many there are.


You dont *need* to know how many there are before assign the list created
by split to an array - what is your *real* question.

/J\
-- 
"You don't watch the Eurovision Song Contest to hear good music" -
Katrina Leskanich, Katrina and the Waves


------------------------------

Date: 22 Jul 1999 08:46:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Array problem
Message-Id: <slrn7pe84c.oqh.abigail@alexandra.delanet.com>

Jimtaylor5 (jimtaylor5@aol.com) wrote on MMCLI September MCMXCIII in
<URL:news:19990722080543.03340.00000726@ng-fx1.aol.com>:
$$ >
$$ >The above code doesn't contain any array. If you know what arrays are,
$$ >as opposed to lists, the answer suddenly is trivial:
$$ >
$$ >   @array = split /\|/ => $line;
$$ >
$$ 
$$ Duh.. Which still doesn't answer my original question of how I would get the
$$ list into variables without knowing how many there are.


Could you give an example of the $line that after being split on |
has a part that isn't captured by a variable?

$array [0], $array [1], etc *are* variables.



Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Thu, 22 Jul 1999 15:04:28 +0100
From: "Jon Ratcliffe" <jonratcliffe@email.com>
Subject: authentication and getting  HTTP_REMOTE_USER
Message-Id: <7n78cj$dgs$1@taliesin.netcom.net.uk>

Hi,

Can anyone help with the following:

I have 'secure' folder setup on my apache (unix) server and am using a
 .htaccess file to force users to enter a username and password. The
passwords are stored in a .htpasswd file. If the user enters a correct
username and password. they continue into the site.


I would like to 'capture' the username that the user enters into the dialog
box so that I can use it to 'track' that particular user throughout the
site. I could then use the name as a key  to get other information for that
user from a text file.

I thought this would be a simple case of reading the HTTP_REMOTE_USER to get
the username/password and then storing that username into a cookie. The
cookie could then be called upon at a later stage.

I have tried to get this information (using the CGI module) as follows:

use CGI;
$query = new CGI;
$username= $query->remote_user();

This just seems to return an empty string.

I can get other header information such as user_agent or remote_host, but
not remote_user.

Has anyone experienced this before or does anybody know of another way of
capturing the username from an authentication dialog box?


thanks,


jon ratcliffe




------------------------------

Date: Thu, 22 Jul 1999 15:17:36 +0200
From: Jona Andersen <jona@ds10.hobby.nl>
Subject: Re: basename regexp?
Message-Id: <379719EE.760461D6@ds10.hobby.nl>

Phew!

Never knew a simple question could get so much responses!
Anyways, thanks.

I hit myself on the head after realising since I'm making a CGI script
I could just use $ENV{'SCRIPT_NAME'}, duh.

Joe



------------------------------

Date: Thu, 22 Jul 1999 15:18:41 +0200
From: Thomas Weholt <thomas@bibsyst.no>
Subject: Compressed data-resources - like java-jars???
Message-Id: <37971A31.B2DCC682@bibsyst.no>

hi,

I was wondering if it was possible to store files, like plain-text, html
etc. which would benefit from compression, in "containers", like
java-jars. they`re compressed zip-files, renamed to jar to which the
user only has to define an interface and use the contents of the
compressed archive like it was a plain folder. Could something like this
be done with Gzip og Info-Zip, perhaps using a module??

Thomas Weholt


------------------------------

Date: Thu, 22 Jul 1999 13:14:04 GMT
From: primus3@ix.netcom.com (Dow)
Subject: concatenate
Message-Id: <379718d8.9353136@nntp.lucent.com>

How do you concatenate two strings together?
Like
$string1 = '/dir/dir2/';
$string2 = 'dir3';
and I want
$string3 = '/dir1/dir2/dir3/';
thanks if anyone can help I'd be a really happy girl!



------------------------------

Date: Thu, 22 Jul 1999 15:33:09 +0200
From: Christoph Wernli <cw@dwc.ch>
Subject: Re: concatenate
Message-Id: <37971D95.AE36A40@dwc.ch>

Dow wrote:
> 
> How do you concatenate two strings together?
> Like
> $string1 = '/dir/dir2/';
> $string2 = 'dir3';
> and I want
> $string3 = '/dir1/dir2/dir3/';
> thanks if anyone can help I'd be a really happy girl!

perldoc perlop

and search for 'concatenate'.

-w


------------------------------

Date: Thu, 22 Jul 1999 12:29:07 GMT
From: primus3@ix.netcom.com (Dow)
Subject: doing an ls in PERL (globbing)
Message-Id: <37970db8.6504406@nntp.lucent.com>

I'm trying to do the UNIX command - ls - in PERL script
what I orginally was doing was globbing by assigning a directory to an
array :


@directory = </some/path/name/>

#Then I walked thru the array:
foreach $i (@directory){
	#here is where my problem is:
	@directory2 = <$i>;
	# I tried to create another glob but it won't work
	# I think it's because $i = 'some var'; and 
 	# some var is in single quotes.  I know that you can't
	# do a glob in quotes at all!  How do I remedy this or 
	# is there a completely different way of doing this?
}

Thanks a million ;-)
-Linda


------------------------------

Date: Thu, 22 Jul 1999 13:53:12 GMT
From: "Jean-Marc Beaudoin" <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
Subject: Executing system commands
Message-Id: <cnFl3.9129$8v6.586329@carnaval.risq.qc.ca>

Good day,

How can I execute an O/S command with perl?

Ie.: Call a Unix script (c Shell) that generates an output into a file so
the Perl script would then access.

Thanks,






------------------------------

Date: Thu, 22 Jul 1999 07:33:13 -0500
From: Darren greer <dgreer@websightsolutions.com>
Subject: Re: Fun with Net:NNTP
Message-Id: <37970F89.6418D49E@websightsolutions.com>

Thanks!  Your right, there wasn't much left to do.  Thanks for your help.

Darren



I R A Darth Aggie wrote:

> On Wed, 21 Jul 1999 13:27:08 -0500, Darren greer
> <dgreer@websightsolutions.com>, in
> <379610FC.6696BA21@websightsolutions.com> wrote:
>
> + If you can make out exactly how to post to newsgroups using that
> + documentation, you can read much deeper into than I can.
>
> You're about 99% of the way there...
>
> + No where in there does it say the format that MESSAGE should be in.
>
> It isn't the message...its the header...and yes, I got your code to work.
>
> Here is a tip: comment out this line, and replace it:
>
> #my $newsptr = Net::NNTP->new('news.mixcom.com');
> my $newsptr = Net::NNTP->new('news.mixcom.com','Debug',10);
>
> The server quite cheerfully tells you what's wrong. That's left as an
> exercise for the student. If you're really stuck, I'll post my revision
> to your code. I have a feeling that you're going to say "D0H!" when you
> realize what it is... ;)
>
> Interestingly enough, I was able to post using a $scalar
> variable, not a @list. I don't know if that's a feature or a bug, tho.
>
> As for the documentation on invoking the debug code, Net::NNTP is
> less-than-satisfactory, particularly compared to its sibling Net::FTP.
> I had a critical advantage over you in that I've used the Net::FTP
> module (same author) and had that syntax down in a working
> script. Usage of it is better described in Net::Cmd, tho.
>
> James



------------------------------

Date: Thu, 22 Jul 1999 14:32:46 +0200
From: danny <pcl@dds.nl>
Subject: Help me ..; databases ...
Message-Id: <37970F6E.D198ABEE@dds.nl>

hi,

my server supports this

Windows NT Server
                                                       Database and CGI

ColdFusion 4 Enterprise

Chili!ASP
                                                                 PhP3
                                                                 Perl 5,
Visual Basic & C++ CGI
                                                                 ODBC
Support

whats the best way to use a database in perl ?

(i used dbmopen, but this is garbage!)

sincerly,


danny






------------------------------

Date: Thu, 22 Jul 1999 13:48:36 GMT
From: karsten_beijer@my-deja.com
Subject: Help!
Message-Id: <7n77fg$rmt$1@nnrp1.deja.com>

I am using the perl script from my provider, I use an guestbook en form.

Now Í want the same background  (my background) on every page.

Í maem: if there is an error (because you didn't fill in your name)
then come an white page, but I want mij page background

You can e-mail me at karsten@reproshop.nl

Thanks


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Thu, 22 Jul 1999 12:34:04 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: how to avoid truncation error?
Message-Id: <37990ebc.20766703@news.skynet.be>

Jon Orwant wrote:

>Floating point arithmetic often requires a little tolerance.

Question: how much?

>use constant epsilon => 1e-14; 

That's a fixed value for the threshold for floating point values. Maybe
this will work for values of which you can roughly estimate the average
value, and you NEED a fixed threshold for the lot.

In principle, the threshold should be somewhat relative to the value of
the number, i.e. apply the threshold only to the mantissa of the number,
not on the exponent.

But: what ratio?

	Bart.


------------------------------

Date: 22 Jul 1999 09:02:52 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: index.cgi script help
Message-Id: <slrn7pe937.oqh.abigail@alexandra.delanet.com>

Mike (mike@customautotrim.com) wrote on MMCLI September MCMXCIII in
<URL:news:37967D43.B87E5059@customautotrim.com>:
^^ 
^^ I am on a server that uses an index.cgi file that redirects all requests
^^ for my main domain (http://customautotrim.com) to

That makes sense. Never shy away from starting up an extra process if
all it takes is a configuration line in a web server. People might think
your site is fast!

^^ http://customautotrim.com/index.html with this command:
^^ 
^^ if($url eq "") {$url="http://www.customautotrim.com/index.html"}
^^ 
^^ I want it to be
^^ if($url eq "") {$url="http://www.customautotrim.com/"}

And what is your problem? How to type it in? If you did it once in
the newsgroup, why not in the program?

^^ The problem is that the index.html always shows up in the address bar.

And that is a *Perl* problem because of? I don't even understand why this
is a problem. If you don't want index.html to be shown up, by all means,
don't forward people to a document with index.html in the name!

^^ My host says I can't change the script like that, and there is not a
^^ scipt  anywhere that I can use to achieve my goal.

Well, if the host says so... you are the guest, you play be the hosts
rules. But what does your system administrator say?

^^ Does anyone know of a fix for this, or know where I can get help?

I'd suggest talking to your system administrator. But him or her a case
of beer, and approach him/her when (s)he isn't busy, or isn't about to
leave for home.




Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Thu, 22 Jul 1999 15:25:24 +0200
From: Jona Andersen <jona@ds10.hobby.nl>
Subject: No subject was specified.
Message-Id: <37971BC1.7716929D@ds10.hobby.nl>



> If you promise to read up on regular expressions and learn Perl, an answer

I promise. (said with the camel book on my lap)

Joe



------------------------------

Date: Thu, 22 Jul 1999 15:27:34 +0200
From: Jona Andersen <jona@ds10.hobby.nl>
Subject: Re: No subject was specified.
Message-Id: <37971C43.64B9C3C7@ds10.hobby.nl>

Sorry! Meant to go to "basename regexp?" thread
*blush*



------------------------------

Date: Thu, 22 Jul 1999 13:51:02 GMT
From: echao@interaccess.com (Eisen Chao)
Subject: Perl CGI vs VB ASP
Message-Id: <932651462.039.34@news.remarQ.com>

Hi All:

I'm familiar with using Perl within CGI,
but not with VB & ASP.

What are the advantages of the Perl/CGI
combination over using the Micro$oft
product ? 

We are going over to an M$ Web Server and
I have to justify the further use of perl.


Thanks in Advance,

Eisen


------------------------------

Date: Thu, 22 Jul 1999 13:59:21 GMT
From: "Jean-Marc Beaudoin" <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
Subject: Re: Perl CGI vs VB ASP
Message-Id: <ZsFl3.9132$8v6.586402@carnaval.risq.qc.ca>

When your VB or ASP scripts bombs...You can always blame Bill...
When your Perl scripts bombs...You can only blame yourself....

Besides of that, Perl is more performant.


Eisen Chao <echao@interaccess.com> a écrit dans le message :
932651462.039.34@news.remarQ.com...
> Hi All:
>
> I'm familiar with using Perl within CGI,
> but not with VB & ASP.
>
> What are the advantages of the Perl/CGI
> combination over using the Micro$oft
> product ?
>
> We are going over to an M$ Web Server and
> I have to justify the further use of perl.
>
>
> Thanks in Advance,
>
> Eisen




------------------------------

Date: Thu, 22 Jul 1999 12:42:09 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: problem with <input type="image".....
Message-Id: <37970391.624E5AFE@hotmail.com>

bobby wrote:
> 
> Hi,
> 
>         Would anyone be able to help me with this
> 
> From within a html page created from a script i have a submit button but
> im using image instead of submit. ie:
> 
>         thanks for any help

Run away from this group fast !!!!!


------------------------------

Date: Thu, 22 Jul 1999 13:40:41 GMT
From: mike cardeiro <mikecard@my-deja.com>
Subject: Re: Returning file handle from a subroutine
Message-Id: <7n770n$ria$1@nnrp1.deja.com>

In article <7n6qkv$nm5$1@nnrp1.deja.com>,
  Rajasankar <rajasankark@my-deja.com> wrote:
> I have a piece of code which returns filehandle to the
> file passed to it.
>
> sub myopen{
>   open(HANDLE,$_[0]) or die "cannot open $_[0]";
>   return(*HANDLE);
> }
>
> My doubt is won't there be any conflict if this function is used
> more than once to open different files,since file handle has same
> name?

you could (maybe) pass a handle to the the subroutine:

myopen('THIS_HANDLE',file);
  sub myopen{
    open($_[0],$_[1]) or die "cannot open $_[1]";
  }


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Thu, 22 Jul 1999 07:41:32 -0500
From: "John A. Murphy" <murf@perftech.com>
Subject: Re: Scrollback perldoc in DOS-window?
Message-Id: <3797117C.331C@perftech.com>

starthoughts@my-deja.com wrote:
> 
> Or: How am I supposed to read pods when the pipe
> "|more" does NOT work with perldoc.bat -f ?
> 
> I used to use a very nice SCROLL BACK buffer
> program in plain old DOS and Windows 3.x, but it
> does NOT work at all with Windows 95! So, I have
> usually used " |more" or even " > filename.txt"
> to read whatever flys by on the screen so fast
> that I sometimes can't even see it let alone
> read it there.
> 
> Having started using Perl, I notice that some of
> the pods have some kind of screen paging built
> into them, BUT WHENEVER I use the "-f" parameter
> of perldoc.bat to find out about a function, the
> information just flys off the screen (no paging)
> and I can NOT use " |more" either!
> 
> Once again, I'm using Windows 95 and have tried
> this with BOTH the "standard" and ActiveState
> versions of perl. Does anyone have a method that
> actually works?
> 
> The Starman
> http://www.geocities.com/Athens/6939/perl.html
> Email: thestarman3 (at) netzero NOSPAM (dot) com
> (or just go to Feedback.html at my website).
> 
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
I use Buerg's LIST utility.
Set the environment variable (SET PAGER=LIST) and it works great with
PERLDOC.

Murf


------------------------------

Date: Thu, 22 Jul 1999 13:30:43 GMT
From: "Jean-Marc Beaudoin" <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
Subject: Re: Server NT et Perl
Message-Id: <72Fl3.9127$8v6.586175@carnaval.risq.qc.ca>

You must configure your Web Server (ie.: IIS) for the proper script mapping
to .pl or .cgi so it will know what to do with them.

Ie.:    Map .pl to c:\perl\bin\perl.exe % %

The % % are very important.

Vincent Maugain <V_Maugain@mail.dotcom.fr> a écrit dans le message :
3795dc8e.1661616@news.club-internet.fr...
> I try to work on a server NT and when I start my form, my navigator
> puts me the source of my file offre_cgi.pl
>
> You can see my appliacation at this address
> This my file : http://www.aeseo.com/offres/offre_cgi.html
> <FORM ACTION="http://www.aeseo.com/cgi-bin/offre_cgi.pl" METHOD="get"
> enctype="application/x-www-form-urlencoded">
>
> and my program Perl :
> #! c:\perl\bin\
> print "Content-Type: text/html\n\n";
> print "toto\n";
>
> Thanks,
>
> Vincent.




------------------------------

Date: Thu, 22 Jul 1999 13:32:04 GMT
From: John.Borwick@sas.com (John Borwick)
Subject: Re: setuid and opening a file for writing
Message-Id: <37a11d12.264040530@newshost.unx.sas.com>

On Thu, 22 Jul 1999 07:44:45 +1000, mark@NO-SPAM.lavalink.com.au (Mark
Francis) wrote:

>I have a setuid perl script. The first thing it does is changes UID and
>EUID to that of a specified user (can't change GID and EGID for some
>reason, but I'll worry about that later).

This might sound silly, but when you change user ids do you lose the
ability as root to change group ids?

($EUID, $EGID) = ($GID, $UID);

?

-- 
John Borwick


------------------------------

Date: Thu, 22 Jul 1999 08:51:33 -0400
From: Default User <ftns@hotmail.com>
Subject: Re: SSI in Perl CGI output
Message-Id: <379713D5.F97DC3A5@hotmail.com>

> Crap! when will apache 2.0 be released? And is there any possible
>workaround for this?

Can't you read and then print the contents of the file in your CGI ?


------------------------------

Date: Thu, 22 Jul 1999 13:25:49 GMT
From: "Philip H. Dye" <Philip_Dye@norstanconsult.com>
Subject: Re: waitpid crashes perl
Message-Id: <01bed446$b3375620$918ee226@phdye-laptop>

Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in article 
> Yes.  Perl isn't reentrant and malloc() (perl's or other) is a
particularly
> likely candidate.
> 
> >Has anyone run into this behavior before ?  Any known work arounds ?
> 
> A suggested workaround is to do as little as possible in the signal
> handler, for instance just set a preset variable (not an undefined
> one).  Of course, the main program will have to check that variable
> periodically and act accordingly, which can be a nuisance to do.

My signal handler is nearly a copy of the one on page 340 of Programming
Perl.

sub reaper
{
  my $child ;

  while ( $child = waitpid(-1,WNOHANG) )
  {
    $Child_Status { $child } = $? ;
  }
}

$Child_Status{$child} was initialized in the main thread after being called
so it wouldn't result in dynamic allocation.

The stack trace clearly shows malloc() being called within a scalar upgrade
within waitpid().

#0  0xd047fd14 in pthread_kill ()
#1  0xffffffff in ?? () from (unknown load module)
#2  0xd047f950 in raise ()
#3  0xd03687ac in abort ()
#4  0x10018e3c in _dmalloc_die ()
#5  0x10018cc8 in dmalloc_error ()
#6  0x100179e4 in check_debug_vars ()
#7  0x10018448 in _loc_malloc ()
#8  0x10018b34 in malloc ()
#9  0x1001298c in Perl_safemalloc (size=24) at util.c:89
#10 0x1000338c in my_safemalloc (size=24) at sv.c:608
#11 0x10006a38 in Perl_sv_upgrade (sv=0x20ae5994, mt=6) at sv.c:791
#12 0x10010a40 in Perl_sv_2iv (sv=0x20ae5994) at sv.c:1355
#13 0x100bd778 in Perl_pp_waitpid () at pp_sys.c:3167
#14 0x100aec84 in Perl_runops_standard () at run.c:30
#15 0x1002a36c in perl_call_sv (sv=0x2068e5ac, flags=2) at perl.c:1304
#16 0x1004b89c in Perl_sighandler (sig=20) at mg.c:1963
#17 0xd23d9f08 in sslsshandler ()
#18 <signal handler called>
#19 0x10021568 in _fill ()
#20 0x100184f8 in _loc_malloc ()
#21 0x10018b34 in malloc ()
#22 0x1001298c in Perl_safemalloc (size=73) at util.c:89
#23 0x1000bce8 in Perl_sv_grow (sv=0x20ae3850, newlen=73) at sv.c:1131
#24 0x10008f18 in Perl_sv_setpvn (sv=0x20ae3850, ptr=0x2ff1f600, len=72) at
sv.c:2333
#25 0x10011c3c in Perl_newSVpv (s=0x2ff1f600 " ­\207\b", len=72) at
sv.c:3700
#26 0xd23021b4 in dbd_preparse (imp_sth=0x20ad8708,

Philip



------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 225
*************************************


home help back first fref pref prev next nref lref last post