Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: flock -- and indefinite wait

by Xxaxx (Monk)
on Jul 23, 2003 at 07:50 UTC ( [id://277069]=note: print w/replies, xml ) Need Help??


in reply to flock -- and indefinite wait

Well... <embarassed grin> after reading past paragraph two in the flock perldoc (5.6.0) I found the answer to much of the above.

Then I stumbled across tilly's node about "flock feedback". That answered much of the rest of the above questions.

I'm still puzzled by the proliferation of loop code sans the "| LOCK_NB".

And, I'm still killing run-a-muck perl scripts by hand.

So if you can overlook my previous inability to get past paragraph two in the perldoc, maybe someone will have a clue about how to do the clean-up of scripts left dangling by an escaping browser.

Thanks Claude

Replies are listed 'Best First'.
Re: Re: flock -- and indefinite wait
by perlplexer (Hermit) on Jul 23, 2003 at 14:55 UTC
    "...maybe someone will have a clue about how to do the clean-up of scripts left dangling by an escaping browser."

    Well, do you know what causes them to "dangle"? Are they all waiting on a lock? If so, tilly's node should provide a good solution to your problem; i.e., using LOCK_NB and retrying.
    Alternatively, you can use alarm(). Signal handling is pretty reliable if you're careful; i.e., instead of dumping loads of potentially non-reentrant code into the handler itself, just set a flag and handle the condition in your main program.

    --perlplexer

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://277069]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found