Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^14: sysread/syswrite wrappers

by vsespb (Chaplain)
on Oct 13, 2016 at 04:56 UTC ( [id://1173896]=note: print w/replies, xml ) Need Help??


in reply to Re^13: sysread/syswrite wrappers
in thread sysread/syswrite wrappers

In other words. IT WORKS!
No. It does not. It hangs. Unless you reconnect every messages (close socket after every message and make new connections for new messages).
that your code was exactly as vulnerable to the same issue -- an incomplete message, perpetual block -- as they are.
Ie. If you added that sleep in the same place in the client code, and ran it against your OP sysread() wrapper, it blocks in exactly the same way!
No. Your code hanged without printing "This is the last line". Mine would block in the same select, waiting new data (which will not come), but after printing "This is the last line".
Ie. If you added that sleep in the same place in the client code, and ran it against your OP sysread() wrapper, it blocks in exactly the same way!
No, but my code will block in case incomplete message (which will never happen, unless client is buggy), and your code hangs even in the middle of complete message: client sent complete message, but code read only half of it.

Replies are listed 'Best First'.
Re^15: sysread/syswrite wrappers
by BrowserUk (Patriarch) on Oct 13, 2016 at 06:39 UTC
    It works. Until *YOU* fuck it up.

    Thick as two short planks.

      You were not right from the beggining, in all your statements. And you can't admit your mistakes. Discussion is useless.
        And you can't admit your mistakes. Discussion is useless.

        I agree. Discussion with you is useless whilst you continue to deny the evidence -- that you posted --, that it not only works on my windows system, it works on your *nix system also.

        If I modify your code in a way incompatible with it working, it'll stop working. Well, duh!


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found