Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-125880: Fix exit codes in PyREPL#125890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Eclips4 wants to merge6 commits intopython:main
base:main
Choose a base branch
Loading
fromEclips4:fix-exit-codes

Conversation

Eclips4
Copy link
Member

@Eclips4Eclips4 commentedOct 23, 2024
edited by bedevere-appbot
Loading

@Eclips4Eclips4 marked this pull request as ready for reviewOctober 26, 2024 22:01
@@ -101,6 +101,7 @@ pymain_err_print(int *exitcode_p)
int exitcode;
if (_Py_HandleSystemExit(&exitcode)) {
*exitcode_p = exitcode;
Py_Exit(exitcode);
Copy link
MemberAuthor

@Eclips4Eclips4Oct 26, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is needed in order to match behavior ofPyRUn_AnyFileExFlags(which the old REPL called an still calls ifPYTHON_BASIC_REPL=1) which somewhere callshandle_system_exit (Python/pythonrun.c::L632)) which handlesSystemExit and callsPy_Exit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

In that case this path doesn't return as this callsPyFinalize_Ex and thenexit()

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As well as previous approach withPyRun_AnyFileExFlags, so, is this a problem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not sure I follow what you mean. Could you clarify ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sorry for not being clear!
I mean, the previous approach withPyRun_AnyFileExFlags contains path withhandle_system_exit which is also didn't return as it callsPyFinalizeEx and thenexit().

@Eclips4Eclips4 added the needs backport to 3.13bugs and security fixes labelOct 26, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

@ambvambvAwaiting requested review from ambvambv is a code owner

Assignees
No one assigned
Labels
awaiting core reviewneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixes
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Eclips4@pablogsal@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp