stderr

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Salvi
    New Member
    • Feb 2008
    • 9

    stderr

    Dear Friends ,
    Why standard error is always unbuffered ?

    Thanks in advance . . .

    Regards ,
    Salvi...
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    If you are using stderr then presumably and error has occurred. If the error is serious the state of the system in unknown and could be unstable, in such an instance you want to keep the code as simple as possible to give it the best chance of working so stderr is unbuffered so that in the case of a critical error you have the best chance possible of actually getting to see your error messages.


    Well that's my guess anyway :D

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      stderr is unbuffered so your error message is not locked in memory should the program crash.

      Comment

      • Salvi
        New Member
        • Feb 2008
        • 9

        #4
        Dear Friends ,
        Thanks a lot for your answers .
        I too got one answer that the reason stderr is unbuffered so that any error messages are displayed as quickly as possible, regardless of whether they contain a newline .

        Regards,
        Salvi...

        Comment

        Working...