Ahh I see (and mentally it all falls into place for me)! I don't know why this didn't occur to me before since I've written socket code in perl before and paid attention to blocking (and used non blocking sockets) but never really paid attention to file system blocking. I do remember reading a long time ago that pipes behaved in this way but I have sometimes come across incidents when I have used pipes in the unix shell when i've got an error which my recollection seems to suggest was related to out of memory. But I guess it all depends on both the exact way a pipe is being used and the particular commands which are being piped. Try to pipe a program / command which has to write in non blocking mode to something which does not slurp data in without hesitation will I guess cause an error if the pipe overflows. Use a command / program which uses a blocking write and all will work nicely.
So all I need to do is check my source program is opening the file in blocking mode, and if its not, simply change the opening mode to blocking and 'pausing' should automagically fall into place. I feel a bit of a twerp for having to ask this but hey ho thanks for being gentle!
Cheers, Pete
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.