Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: select($rin,undef,undef,undef) only blocking once

by rabbit7 (Initiate)
on Jul 26, 2005 at 13:43 UTC ( [id://478185]=note: print w/replies, xml ) Need Help??


in reply to Re^3: select($rin,undef,undef,undef) only blocking once
in thread select($rin,undef,undef,undef) only blocking once

the code i posted is just an example to demonstrate my problem with fifos. i am using select() because sometimes i want to return from waiting for input.

select($rin,undef,undef,$timeout)
i am not using $buf = <FH> because i thought your not supposed to use it when you use select()
  • Comment on Re^4: select($rin,undef,undef,undef) only blocking once

Replies are listed 'Best First'.
Re^5: select($rin,undef,undef,undef) only blocking once
by Tanalis (Curate) on Jul 26, 2005 at 13:49 UTC
    You shouldn't use select with buffered reads, no - in that case, I'd stick with your solution, especially if you want to use explicit read timeouts.

    My code was an example showing how you could avoid the use of select, if your circumstances permitted it - which it seems they don't :)

      Hmm still would be cool if i dont have to reopen the FIFO everytime the loop gets executed. If anyone has a hint how to do that im glad to listen and try ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-20 14:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found