Talk:Not a typewriter

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)


 * The page is correct. After initializing stdio, if standard input or output was not a tty device, errno was set to ENOTTY. Subsequent erroneous calls to strerror or perror produced this message. If isatty restores errno, then typically you get erroneous "Error 0" messages.
 * On Microsoft operating systems, the analogous failure message was "The operation completed successfully", leading to naive applications producing errors like "Could not refrib the widget because: the operation completed successfully." Examples at http://stackoverflow.com/questions/1209769/system-componentmodel-win32exception-the-operation-completed-successfully and http://blogs.technet.com/b/appv/archive/2011/03/10/getting-rid-of-the-pop-up-message-the-operation-completed-successfully-when-running-virtualized-office-2010-under-app-v.aspx -- Resuna (talk) 21:07, 16 January 2013 (UTC)
 * I'm working up a new page for Microsoft's equivalent at User:Resuna/The operation completed successfully -- Resuna (talk) 19:37, 31 January 2013 (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)