develooper Front page | perl.perl5.porters | Postings from April 2008

RE: tpp_gui.pl forking problem

Thread Next
From:
Aschwin van der Woude
Date:
April 23, 2008 01:50
Subject:
RE: tpp_gui.pl forking problem
Message ID:
1208934141.21389.43.camel@avdwoude-desktop
Hi,

Oops, forgot to mention the most important bits.

This is on Linux (Debian Etch) with version 3.5.3 of TPP behind Apache
version 2.2.3.

After some more trial and error we discovered that the "open STDERR,
'>/dev/null'" statement is not liked by fork(). Merely commenting that
statement makes it work again.

I've also checked out the latest svn version and there STDERR is
redirected to STDOUT, which also makes fork() happy.

I am not sure if this a perl bug or perhaps a wrong use of fork(). The
documentation isn't too clear on this issue. Naturally, STDOUT needs to
be reopened to keep apache happy. But it isn't clear to me why STDERR is
causing these problems.

But it works again, so I am happy.

-Aschwin

ps. I am cross-posting this to the perl mailinglist in case they have
more clues about it.

On Tue, 2008-04-22 at 11:59 -0700, Brian Pratt wrote:
> What platform is this on (linux, cygwin, mingw, vc8, Darwin?)?
> 
> Are you using the latest code?  We've been working in this area lately.
> 
> Brian
> 
> -----Original Message-----
> From: spctools-discuss@googlegroups.com
> [mailto:spctools-discuss@googlegroups.com] On Behalf Of Aschwin van der
> Woude
> Sent: Tuesday, April 22, 2008 9:44 AM
> To: spctools-discuss@googlegroups.com
> Cc: veronika.suni
> Subject: tpp_gui.pl forking problem
> 
> 
> Hi,
> 
> After pounding my head on a fork, I don't seem to get any wiser. 
> 
> The problem is that tpp_gui.pl doesn't execute any of the external
> commands. The required path settings are all correctly set. And if I run
> the suggested commands by hand they do work. It ain't a permission
> problem either, as they are wide open atm.
> 
> After digging into the code I sprinkled some printToLog statements
> around the fork statement, and for some reason the code doesn't get
> beyond the fork().
> I do see the following error in the apache logs, which I am not sure if
> it relates as it is triggered every time a page is loaded:
> 
>  tpp_gui.pl: Use of uninitialized value in concatenation (.) or string
> at (eval 22) line 43., referer:
> http://tpp-proteomics.btk.fi/cgi-bin/tpp_gui.pl
> 
> 
> Nor is it clear where this bug is located, it seems likely to be in one
> of the many string-blocks.
> 
> Unfortunately, some googling for fork() problems didn't reveal anything
> useful.
> 
> So I am hoping one of you can get that damn fork out of my head so I'll
> be smart *ugh* *ugh* again.
> 
> Thanks for any hints,
> 
> -Aschwin
> 
> 
> 
> 
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "spctools-discuss" group.
> To post to this group, send email to spctools-discuss@googlegroups.com
> To unsubscribe from this group, send email to spctools-discuss-unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/spctools-discuss?hl=en
> -~----------~----~----~----~------~----~------~--~---


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About