Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a23e0243af5e6bf7

Jump to content

Talk:Not a typewriter

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 13 years ago by Dsalt in topic standard streams

standard streams

[edit]

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 */<br />
if(!fp) {<br />
&nbsp;&nbsp;if(!log) log = fopen("logfile", "w"); /* buffering test on open generates ENOTTY */<br />
&nbsp;&nbsp;fprintf(log, "%s\n", sys_errlist[errno]); /* prints "Not a typewriter" */<br />
}

Modern isatty() implementations take care to restore errno. — 88.96.79.118 (talk) 09:00, 29 September 2009 (UTC)Reply

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)Reply
I'm working up a new page for Microsoft's equivalent at User:Resuna/The operation completed successfullyResuna (talk) 19:37, 31 January 2013 (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. — 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