Talk:Not a typewriter

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

As I recall it the usual source of the bogus message was not a "leftover" ENOTTY, but one generated after the real error when stdio determines how to buffer output on the error stream. For example:

fp = fopen("some/file", "r"); /* fails */
if(!fp) {
  if(!log) log = fopen("logfile", "w"); /* buffering test on open generates ENOTTY */
  fprintf(log, "%s\n", sys_errlist[errno]); /* prints "Not a typewriter" */
}

Modern isatty() implementations take care to restore errno. —Preceding unsigned comment added by 88.96.79.118 (talk) 09:00, 29 September 2009 (UTC)

If this error code is returned, then at some point a diagnostic message may be output. Because some people consider "Not a typewriter" to be a confusing message some systems display a different confusing message such as "Inappropriate ioctl for device" instead. The real source of these confusing messages is, alas, often more subtle.

LMAO. —Preceding unsigned comment added by 194.66.74.4 (talk) 22:53, 11 May 2010 (UTC)

I've seen this when running lsattr on my Android phone (running CM10.1). Dsalt (talk) 18:07, 23 April 2013 (UTC)