diff options
author | Guido van Rossum <guido@python.org> | 1991-12-31 13:15:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-31 13:15:35 (GMT) |
commit | 6a468bf71cd4665d7872f48821dec69566f438cc (patch) | |
tree | 6f0b72aa6000998bebf7fffabdf97a96a82613c6 /Python | |
parent | 5afc74757bae4a7274a5db0888985cd84ed92d32 (diff) | |
download | cpython-6a468bf71cd4665d7872f48821dec69566f438cc.zip cpython-6a468bf71cd4665d7872f48821dec69566f438cc.tar.gz cpython-6a468bf71cd4665d7872f48821dec69566f438cc.tar.bz2 |
Raise SystemExit instead of calling goaway().
Diffstat (limited to 'Python')
-rw-r--r-- | Python/sysmodule.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index ef93d20..c846068 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[] = { |