GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-35537: Rewrite setsid test for os.posix_spawn by vstinner · Pull Request #11721 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Feb 1, 2019 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().

https://bugs.python.org/issue35537

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
vstinner requested a review from gpshead as a code owner February 1, 2019 11:16
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 1, 2019
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting merge labels Feb 1, 2019
@vstinner vstinner added the skip news label Feb 1, 2019
@vstinner

vstinner commented Feb 1, 2019

Copy link
Copy Markdown
Member Author

@nanjekyejoannah, @izbyshev: Would you mind to review my PR?

Alexey: I also fixed test_subprocess.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

izbyshev
izbyshev reviewed Feb 1, 2019
View reviewed changes

@izbyshev izbyshev left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM except several small issues.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_posix.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_posix.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_posix.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
bpo-35537: Rewrite setsid test for os.posix_spawn
6dbc3a1
bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
@vstinner

vstinner commented Jun 14, 2019

Copy link
Copy Markdown
Member Author

@izbyshev: Would you mind to review my update PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gpshead
gpshead approved these changes Jun 14, 2019
View reviewed changes
Comment thread Lib/test/test_subprocess.py
if e.errno != errno.EPERM:
raise
else:
parent_pgid = os.getpgid(os.getpid())

@gpshead gpshead Jun 14, 2019

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

i'm wondering if there is a reason this code was calling os.getpgid() rather than os.getsid() but I honestly do not remember. We added this test 9 years ago with the _posixsubprocess.c internals rewrite, regardless of that calling setsid(). My PGID vs SID knowledge is vague and needs refreshing, they're probably the same in this situation?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Jun 14, 2019

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I cannot tell you why you wrote this code :-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
vstinner merged commit 5884043 into python:master Jun 14, 2019
@bedevere-bot bedevere-bot removed the awaiting merge label Jun 14, 2019
@vstinner
vstinner deleted the posix_spawn_setsid_test branch June 14, 2019 17:31
@vstinner vstinner added the needs backport to 3.8 label Jun 14, 2019
@miss-islington

miss-islington commented Jun 14, 2019

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.8 label Jun 14, 2019
@bedevere-bot

bedevere-bot commented Jun 14, 2019

Copy link
Copy Markdown

GH-14093 is a backport of this pull request to the 3.8 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington added a commit that referenced this pull request Jun 14, 2019
@miss-islington @vstinner
bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)
e696b15
bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
(cherry picked from commit 5884043)

Co-authored-by: Victor Stinner <[email protected]>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
@vstinner @lisroach
bpo-35537: Rewrite setsid test for os.posix_spawn (pythonGH-11721)
2f43619
bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
@vstinner @DinoV
bpo-35537: Rewrite setsid test for os.posix_spawn (pythonGH-11721)
04c2b60
bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead approved these changes
+1 more reviewer
@izbyshev izbyshev izbyshev left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@vstinner @miss-islington @bedevere-bot @gpshead @izbyshev @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.