Here's the actual code for the CLOSE:} elsif (SliMP3::Info::isOgg($fullpath) && SliMP3::Prefs::get("transc +ode-ogg")) { # Note we have to put the path in double quotes so that # spaces in file names are handled properly. my $ogg_cmd = "ogg123 -q -p 5 -d raw -f - \"$filepath\""; my $lame_cmd = "lame -x -r - - &"; $client->mp3filehandle( FileHandle->new() ); $client->mp3filehandle->open("$ogg_cmd | $lame_cmd |");
The OPEN is called when PLAY, NEXT, PREVIOUS is called. OPEN, always calls CLOSE to make sure that there are no running processes. So the code really does work that way. But I see your point about TERM.# close the previous handle to prevent leakage. if (defined $client->mp3filehandle()) { $client->mp3filehandle->close(); $client->mp3filehandle(undef); $client->mp3filehandleIsSocket(0); }
In reply to Re: Re: FileHandle->close() is not closing everything
by Anonymous Monk
in thread FileHandle->close() is not closing everything
by bucky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |