Talk:Not a typewriter

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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)[reply]

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)[reply]

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