Okay, so the reason to use 'syswrite' is that it bypasses buffered IO, and therefore I have higher likelihood of avoiding any kind of conflict as one routine and then the next write to STDERR? And in this case '$|' is extraneous?

I noticed that documentation for 'syswrite' says it processes a single scalar parameter and that 'warn' handles a list. Yet when I broke my example's warn strings into a list of two parameters, the 'syswrite' seemed to print everything that 'warn' was given. Is it somehow scooping up all those parameters as individual scalars to 'syswrite' against?

Regarding naming the filehandle differently from STDERR: If I do so won't that be misleading since all the normal STDERR-bound things like 'warn' and various warnings from the system will go to the designated filehandle, and a print STDERR 'some warning' would not be mixing with the other warnings? I guess it's a matter of perspective.

Suppose a user opens the logfile with Notepad or vim, and does some editing. To do so while the Tk frontend of the program is open, not doing anything because the user hasn't invoked any functions recently via a widget, still sounds suboptimal since the program itself still has hooks with the logfile via the ">>" open. Within my program, when users open the file via my button (invoking Notepad or vim via a 'system' call), they can't get anything else to happen, and so my program won't be competing for the ability to write to that logfile. Is allowing users to access the subject file likely to confuse 'syswrite'? I notice that p. 813 of my Camel book says:

Because syswrite bypasses the C standard I/O library, do not mix calls to it with reads (other than sysread, writes (like print, printf, or write, or other stdio functions like seek, tell, or eof unless you are into heavy wizardry.


In reply to Re^2: multiple programs sharing redirected STDERR via syswrite by ff
in thread multiple programs sharing redirected STDERR by ff

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.