LWN.net Logo

GCC Explorer - an interactive take on compilation

GCC Explorer - an interactive take on compilation

Posted May 26, 2012 22:30 UTC (Sat) by cmccabe (guest, #60281)
In reply to: GCC Explorer - an interactive take on compilation by ejr
Parent article: GCC Explorer - an interactive take on compilation

That's true, but I don't think it's relevant here.

Both printf and puts will set errno when there is an error writing to stdout. The man pages (at least the ones I have installed) are oddly silent about this topic. However, once you realize that both of these functions just turn around and call write() eventually, and write() sets errno, the behavior becomes clear.

tl;dr: errno is a pretty crazy interface, but it's not really a problem here


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds