Scott McIntyre
2002-02-04 05:24:08 UTC
It might take a wee bit more time to fix. I ran into some complications (of
course).
1) We can't set a flag in the signal handler and then test for it in our
main loop. Our main loop waits for network traffic, so the test wouldn't be
run constantly like it would need to. I think I might have to schedule a
task just to check this flag. Not very elegant.
2) MLDBM prefers to use the DB_File module as the underlying database
because it has an unlimited block size. My Perl 5 Pocket Reference says
that's one of the five DB modules included in the list of Standard Modules.
ActivePerl under Windows only feels the need to include one of those five --
and DB_File isn't the one. And of course they're all written in C, so you
can't just copy them into our CPAN dir. I have to see whether it even works
with the one available one. But it does work great under Linux. :)
Scott
----- Original Message -----
From: "dean blackketter" <dean-qV/***@public.gmane.org>
To: <slimp3-dev-***@public.gmane.org>
Sent: Sunday, February 03, 2002 12:20 PM
Subject: Re: [slimp3-dev] Pretty painful restarting the server
you
have
a
the
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Do you need to encrypt all your online transactions? Find
the perfect solution in this FREE Guide from VeriSign.
http://us.click.yahoo.com/vCuuSA/UdiDAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
course).
1) We can't set a flag in the signal handler and then test for it in our
main loop. Our main loop waits for network traffic, so the test wouldn't be
run constantly like it would need to. I think I might have to schedule a
task just to check this flag. Not very elegant.
2) MLDBM prefers to use the DB_File module as the underlying database
because it has an unlimited block size. My Perl 5 Pocket Reference says
that's one of the five DB modules included in the list of Standard Modules.
ActivePerl under Windows only feels the need to include one of those five --
and DB_File isn't the one. And of course they're all written in C, so you
can't just copy them into our CPAN dir. I have to see whether it even works
with the one available one. But it does work great under Linux. :)
Scott
----- Original Message -----
From: "dean blackketter" <dean-qV/***@public.gmane.org>
To: <slimp3-dev-***@public.gmane.org>
Sent: Sunday, February 03, 2002 12:20 PM
Subject: Re: [slimp3-dev] Pretty painful restarting the server
Scott,
Can we expect an updated patch from you? :-)
-dean
saysCan we expect an updated patch from you? :-)
-dean
Yeah, that was me being lazy and ignoring the section of the docs that
nothing is re-entrant. Forgot about that. Also, I only put in a handler
for SIGINT, and it really should have one for die too.
Scott
----- Original Message -----
Sent: Sunday, February 03, 2002 4:00 AM
Subject: Re: [slimp3-dev] Pretty painful restarting the server
for SIGINT, and it really should have one for die too.
Scott
----- Original Message -----
Sent: Sunday, February 03, 2002 4:00 AM
Subject: Re: [slimp3-dev] Pretty painful restarting the server
2) Installs a signal handler to cleanup the database properly when
kill the server.
The problem is that on some platforms, perl will not catch subsequent
signals when it's already in a signal handler, and those signals will
FYI - signals are unreliable under perl.
This deserves a little better explanation.The problem is that on some platforms, perl will not catch subsequent
signals when it's already in a signal handler, and those signals will
their default effect. Eg if we have a long sub for handling a SIGKILL,
second Control-C while we're in the handler would cause us to exit.
So our kill handler should just set a flag and return. Then we'd catch
So our kill handler should just set a flag and return. Then we'd catch
flag in the main loop and call the shutdown procedure from there.
Sponsored by VeriSign - The Value of Trust
Do you need to encrypt all your online transactions? Find
the perfect solution in this FREE Guide from VeriSign.
http://us.click.yahoo.com/vCuuSA/UdiDAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/