summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 6eadd06..dfa6ac8 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1037,7 +1037,10 @@ _PySys_Init(void)
struct stat sb;
if (fstat(fileno(stdin), &sb) == 0 &&
S_ISDIR(sb.st_mode)) {
- Py_FatalError("<stdin> is a directory");
+ /* There's nothing more we can do. */
+ /* Py_FatalError() will core dump, so just exit. */
+ PySys_WriteStderr("Python error: <stdin> is a directory, cannot continue\n");
+ exit(EXIT_FAILURE);
}
}