From: Guido van Rossum Date: Tue, 31 Dec 1991 13:15:35 +0000 (+0000) Subject: Raise SystemExit instead of calling goaway(). X-Git-Tag: v0.9.8~634 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a468bf71cd4665d7872f48821dec69566f438cc;p=thirdparty%2FPython%2Fcpython.git Raise SystemExit instead of calling goaway(). --- diff --git a/Python/sysmodule.c b/Python/sysmodule.c index ef93d2095f97..c8460682cb01 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -96,12 +96,9 @@ sys_exit(self, args) object *self; object *args; { - int sts; - if (!getintarg(args, &sts)) - return NULL; - goaway(sts); - exit(sts); /* Just in case */ - /* NOTREACHED */ + /* Raise SystemExit so callers may catch it or clean up. */ + err_setval(SystemExit, args); + return NULL; } static struct methodlist sys_methods[] = {