Jim Meyering

Jim Meyering

( France)

September 23rd, 2011

From 10:50 to 11:35




Enlarge map

Under the patronage of

  • Logo Ministère de l'économie

Institution partners

  • Direccte Ile de France
  • Région Île de France
  • Ville de paris
  • Agence Régionale de Développement Paris Île-de-France
  • W3C

Diamond Sponsors

  • Red Hat

Platinum Sponsors

  • Alter way
  • Smile

Gold Sponsors

  • Neo Telecoms
  • SUSE
  • vmware Logo
  • Microsoft
  • Intel AppUp℠ Developer Program

Silver Sponsors

  • Oracle Logo
  • Capgemini
  • af83
  • Adacore
  • Bearstech Logo
  • Qualcomm
  • Ubuntu

Bronze Sponsors

  • Accenture
  • Alcatel-Lucent Logo
  • hp
  • Jamendo
  • Nuxeo


Main Organizer

  • Systematic


  • af83
  • Alter way
  • Smile

Experiment day organizers

  • Cap Digital
  • Hackable Devices

Goodbye World! The perils of relying on output streams in C

If you develop in C and want an application to detect and diagnose output errors reliably, then you do NOT want to use the standard stream output functions like putchar, fputs, fprintf, etc. If you must use them anyway, there is a whole raft of corner cases you'll have to worry about. Here, you'll see how to deal with the ugly reality, while retaining some semblance of maintainability.

Many programs write some or all of their output to stdout, the standard output stream. Yet, while most seasoned programmers realize the importance of closing (and diagnosing any failure therein) all files they open, few apply that discipline to stdout. The result is that many programs do not diagnose write errors. As you will see, although applications usually do not open stdout, it is often just as important to close it properly as it is to close any other output stream. I'll illustrate the problem and show how to avoid it in a maintainable and minimally intrusive manner. While handling stdout has some subtle twists, you'll see that using any output stream robustly requires great care, and in some cases it is next to impossible. In the end, you will be wondering why any developer who requires reliable output functions still uses C streams at all.

You must be logged in to post comments!.