Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: confusing fork/readline behaviour

by afoken (Canon)
on Aug 14, 2015 at 18:22 UTC ( #1138623=note: print w/replies, xml ) Need Help??


in reply to Re^2: confusing fork/readline behaviour
in thread confusing fork/readline behaviour

Presumably my script above is unsafe in the general case - I imagine libc could readahead 4k and not finish on a line boundary, then the second process would call readline and start halfway through a line.

Correct.

Why do you want two processes to read the same file?

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^3: confusing fork/readline behaviour

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-02-24 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (104 votes). Check out past polls.

    Notices?