From 72c2c062d71c499863ff6e260525faaea4a53dbb Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 9 Mar 2006 05:58:11 +0000 Subject: Try to be a bit more consistent on all platforms: python . python < . both print a message, return non-zero and do not core dump. --- Python/sysmodule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 6eadd06d9c3..dfa6ac84d91 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(" is a directory"); + /* There's nothing more we can do. */ + /* Py_FatalError() will core dump, so just exit. */ + PySys_WriteStderr("Python error: is a directory, cannot continue\n"); + exit(EXIT_FAILURE); } } -- cgit v1.2.3