[an error occurred while processing this directive]
$IgnoreEOF specifies whether Mathematica should terminate when it receives an end-of-file character as input.
$IgnoreEOF defaults to False.
$IgnoreEOF is assumed to be False if the input to Mathematica comes from a file, rather than an interactive device.
See the Mathematica book: Section 2.13.1, Section A.7.5.
See also: Exit, Quit, $BatchInput.