Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Automating sudo actions

by tilly (Archbishop)
on Jan 26, 2011 at 06:52 UTC ( [id://884282]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Automating sudo actions
in thread Automating sudo actions

The reason you need select or else IO::Select is very simple. When you are both talking to and listening from a process it is very important that you are not talking when it is trying to talk, or listening when it is trying to listen. If that happens you'll get a deadlock which lasts forever.

What select (either version) does is tell you whether it is ready to talk or receive more input, so that you can correctly send or receive data. That way you know which you can safely do and avoid deadlocks.

Please note that doing this correctly is complicated. If at all possible you want to arrange to need to talk to an external process, or listen from it, but not both.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-03-19 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found