Hey Torsten, I hope you don't think I was disparaging (
http://dict.leo.org/?lang=en&lp=ende&search=disparaging ) your help, I
certainly wasn't and I want to thank you for it. I was just lamenting
on a lack of a clear simple example to use as a starting point, much
like almost every programmin
2010/2/20 Torsten Förtsch
[ ... ]
> - is there a portable way to get all open file descriptors of the current
> process? Under Linux one can readdir(/proc/self/fd). On Darwin I once
> simply
> closed all fds from 0 to 1000. Some systems have getdtablesize(2),
> sometimes
> it is getrlimit. Someti
re: close all open file descriptors portably
well, if one is on a POSIX system, _SC_OPEN_MAX gives the max integer.
Then just close them all.
Here's my usual recipe for this:
# close all open file descriptors
my $max_fd = POSIX::sysconf(&POSIX::_SC_OPEN_MAX);
$max_fd = ((! defined $ma
On Saturday 20 February 2010 21:24:31 Cosimo Streppone wrote:
> That's really valuable, thanks for sharing.
> However, a question:
>
> is this something that should be included in Apache2::SubProcess
> to make it better? Or is this something that could be published
> another, separate, CPAN distri
In data 20 febbraio 2010 alle ore 21:16:22, Torsten Förtsch
ha scritto:
On Saturday 20 February 2010 19:25:39 Tosh Cooey wrote:
I do enjoy the fact that nobody really seems to have a simple definitive
vanilla fork/spawn process down pat, it seems everyone does what I do,
trying this and that
On Saturday 20 February 2010 19:25:39 Tosh Cooey wrote:
> I do enjoy the fact that nobody really seems to have a simple definitive
> vanilla fork/spawn process down pat, it seems everyone does what I do,
> trying this and that stumbling about until they come up with some
> monstrosity like Torse
It does, but Proc::Daemon closes a billion file handles and sets new
process IDs and forks and forks and maybe forks a couple more times for
good measure... Fingers crossed!
I do enjoy the fact that nobody really seems to have a simple definitive
vanilla fork/spawn process down pat, it seems e
On Feb 20, 2010, at 7:01 AM, Tosh Cooey wrote:
Anyway, the solution, at least so far until I run into other
problems, seems to be to just make a system() call and the called
program uses Proc::Daemon and things *seem* to work fine in
testing, we'll see when it hits production...
Tosh
Do
tty text:
print "Content-type: text/html\n\nTesting";
You know what? The warning for 1 (from the 'for' loop) is printed and then
it all stops, probably as the browser connection "closes".
Hiding it behind more forks made it work once but then never again.
So it is my
tml\n\nTesting";
>
> You know what? The warning for 1 (from the 'for' loop) is printed and then
> it all stops, probably as the browser connection "closes".
>
> Hiding it behind more forks made it work once but then never again.
>
> So it is my belief t
, probably as the browser connection "closes".
Hiding it behind more forks made it work once but then never again.
So it is my belief that Apache2::SubProcess sucks dirty things, and that
belief won't change until I see proof to the contrary.
On a related note, anyone have
11 matches
Mail list logo