develooper Front page | perl.perl5.porters | Postings from May 2004

Re: FileCache 1.03 (as per 5.8.3) breaks system()

Thread Previous | Thread Next
From:
Alan Burlison
Date:
May 24, 2004 13:21
Subject:
Re: FileCache 1.03 (as per 5.8.3) breaks system()
Message ID:
40B24BB4.9030104@sun.com
Jerrad Pierce wrote:

>>Yes the child process will inherit them, but something like /bin/sh will 
>>immediately change the signal dispositions anyway, so I'm not at all 
> 
> That, would be Somebody Else's Problem i.e; completely out of my control

And it's *meant* to be Someone Else's Problem, so I don't really 
understand why FileCache want to make it Its Problem.

>>dispositions and don't reap children properly, but I'm far from clear 
>>why FileCache is trying to fix this problem when a vanilla perl piped 
>>open doesn't.
 >
> Because, the end user is using FileCache to handle open and close in order to
> manage the number of open handles. Therefore the module should handle all
> other relevant details for the user as well, of which this is one. In
> particular, this is the sanest way of handling the zombie problem where
> FileCache may close a managed filehandle which is a process in order to free
> a spot for a new handle to be created.

But it can't, because you a) can't guarantee that the signal disposition 
won't be altered in the child and b) because the %SIG assignments in 
FileCache are now done with local, they revert back to the defaults as 
soon as the cacheout call returns, so it doesn't do anything useful in 
the parent either.

And I think the whole idea of using FileCache on pipes is bizzare anyway 
- what on earth are the semantics supposed to be?

-- 
Alan Burlison
--


Thread Previous | 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