Fixing a typo the hard way – UNIX standards style (Part 2)

I use UNIX-based systems quite a lot in my daily life. Linux servers, Mac OS X for my desktop, Android for my phone, and so on. The UNIX specification powers most modern software and technology so I’ve found it fun to read up a bit on the history of it. One highly entertaining historical document I found long ago was the UNIX Haters Handbook. While the technical details described therein are extremely dated today one wonders if the general thrust of the book is still relevant. Specifically that “UNIX weenies” (to use the handbook’s phraseology) are rigid, stuck in the past, resistant to progress and proud of comically ugly hackjobs.

While this may seem harsh considering the virulent success of the UNIX model, I wondered if there might be some truth to all of this entertainingly-packaged vitriol in the pages of the haters from a time before mine. I set out to see if there was some merit to their claims.

There is a very famous quote from one of the original designers and implementors of UNIX, a highly accomplished man named Ken Thompson whom I admire. When asked what he would change if he could do UNIX all over again, he replied “I’d spell creat with an e”.  This is a reference to the flag O_CREAT in the open() function in the C standard library and the associated system call. If you look at the reference documentation for the flags to open() you can see that there is a certain “style” to the naming of the flags. Let’s call it lazy typist style. O_RDONLY, O_RDRW, O_EXCL, etc…

I can only assume that Mr. Thompson got a little too carried away with this style and left off the ‘e’ on O_CREAT, and now regrets this mistake. When given the chance to correct it on the operating system interface in Go he famously made the first public commit (with an assist by Rob Pike) on the project to correct the spelling with what I can only imagine was great aplomb and satisfaction.

One must appreciate this great man’s legacy and his determination to correct such a trivial error that has persisted for so many years. It inspired me to see if it was possible to correct this mistake in the UNIX standard, adhered to by every operating system from Apple’s OSX to Linux to BSD and even Windows. This standard is known as “POSIX”.

To quote the POSIX FAQ:

POSIX is an acronym for Portable Operating System Interface.

The name POSIX was suggested by Richard Stallman. It is expected to be pronounced pahz-icks, as in positive, not poh-six, or other variations. The pronunciation has been published in an attempt to promulgate a standardized way of referring to a standard operating system interface.

Big ups to my main man Richard Stallman on that one.

So I decided to try to correct this simple spelling mistake left over from the 1960’s. After all, how hard could it be?

I decided to start small, simply adding an alias to the GNU standard C library implementation. This is essentially the “GNU” in “GNU/Linux” that Mr. Stallman is always harping about. Now, please note that I did not attempt to rename O_CREAT to O_CREATE, I merely added a definition for O_CREATE so that people writing code in this millennium could benefit from this correction going forward. Actually changing the definition of O_CREAT would break basically everything everywhere. So I proposed my change in the #glibc IRC channel with underwhelming results.

IRC

Long story short, glibc did not seem receptive to my change, which is somewhat reasonable. glibc is an implementation of the POSIX standard, and the ideal way to make this change would be to get the proper spelling included in the standard itself. Then no doubt the glibc project would be delighted to accept my one-line addition.

So let’s try making a change to POSIX. I wonder what is involved?

POSIX is a standard (ratified by the IEEE), though the actual standard itself is decided upon by a nefarious group known as the Austin Common Standards Revision Group. I invite you to take a look at their sweet homepage. It’s really an amazing site.

Bracing myself, I dug deeper. Where do I submit a proposal to correct a typo? Maybe I will try the mailing list, since many old-school open source projects still use those to submit patches.

(I love the sweet HTML 1.0 <TABLE BORDER=2> style btw)

Also, I was informed that I must use “proper netiquette” on this list. What nostalgia.

 

Okay, so to subscribe I need an account with the Open Group. Sounds promising. Who doesn’t love open standards??

Should be no problem. Just a small perfunctory form to fill out…

A half hour later, I’m in!

Uh… cool I guess? This is a really sweet PHP app by the way. If you click too hard it sorta falls over.

image

Moving on. After some searching I found a page that mentions leading the strategy for the UNIX standard. Is this what I want? Unsure. I wonder if I need to be a “platinum member” to work on it?

image

????????

Getting nowhere, I decide to try and find the last POSIX revision publication they put out. It’s Open and stuff, right? I find a sweet download link. Ah, but I must verify my email address before downloading the PDF describing the revisions. Can’t be too careful these days.

image

After some fun times resetting my password because it appeared to forget it and their captcha system didn’t actually work, I was fortunate enough to get a nice download link.

I find these jerks:

image

Well… I mean I’m sure some of those people are good guys. I didn’t mean to imply that ALL of them are jerks, though some of them must be responsible for this sad state of affairs. I did recognize at least one name on that list… oh yeah it’s this guy who accused me of “crapping in the implementation namespace.”

Ah, just write a cross-compiler and get a licensed vendor involved! Of course! Or just make the Open Group a giant pile of money to get my change approved. Good to know.

Obviously that won’t be happening any time soon, at least if I can help it. Let’s try another approach. After some more surfing the world wide web circa 1996 I come across a bug tracker for the Austin Group. Maybe I can report a bug! Just need to register, once more.

Well… okay. Nice mail system (godaddy) there. I think the chapter on sendmail in the UNIX Haters Handbook is my favorite, just by the way.

One thought on “Fixing a typo the hard way – UNIX standards style (Part 2)

Leave a Reply