Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • \$\begingroup\$ It would be interesting to see if this can be modified to break through the 8 bit barrier, using the shell like jsh, which supports set -o fullexitcode. \$\endgroup\$ Commented Jan 19, 2017 at 15:10
  • 1
    \$\begingroup\$ That's clever. But the program doesn't actually crash, then. It returns normally, whether the spec is to "cause a fatal exception/irreversible failure/crash" \$\endgroup\$ Commented Jan 19, 2017 at 20:02
  • \$\begingroup\$ Either way, this is awesome. \$\endgroup\$ Commented Jan 19, 2017 at 20:43
  • 4
    \$\begingroup\$ @dim I guess that depends on your definition of crash. Not ending main with return or exit is an error as far as the C90 standard goes, and it results in an exit code that indicates failure. That's all a crash does at heart. \$\endgroup\$ Commented Jan 19, 2017 at 21:17
  • \$\begingroup\$ A crash is a program stopping to function properly. Your program does all that you told it to do properly, it reads one character from the input and then stops. So even though the exit code indicates an error it didn't crash. \$\endgroup\$ Commented Mar 23, 2017 at 14:18