Skip to content

bpo-37031: Reuse _PyRuntime.main_thread in signalmodule.c#13538

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:signal_main2
May 24, 2019
Merged

bpo-37031: Reuse _PyRuntime.main_thread in signalmodule.c#13538
vstinner merged 1 commit into
python:masterfrom
vstinner:signal_main2

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented May 24, 2019

Remove main_thread and main_interp variables from signalmodule.c:
reuse _PyRuntime which already track the main thread and the main
interpreter.

  • Remove #include <sys/types.h> which became useless: getpid() call
    has been removed.
  • Add runtime argument to is_main()
  • is_main() now gets the interpreter from runtime.

https://bugs.python.org/issue37031

Remove main_thread and main_interp variables from signalmodule.c:
reuse _PyRuntime which already track the main thread and the main
interpreter.

* Remove #include <sys/types.h> which became useless: getpid() call
  has been removed.
* Add runtime argument to is_main()
* is_main() now gets the interpreter from runtime.
@vstinner vstinner merged commit d8613dc into python:master May 24, 2019
@vstinner vstinner deleted the signal_main2 branch May 24, 2019 11:44
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
…3538)

Remove main_thread and main_interp variables from signalmodule.c:
reuse _PyRuntime which already track the main thread and the main
interpreter.

* Remove #include <sys/types.h> which became useless: getpid() call
  has been removed.
* Add runtime argument to is_main()
* is_main() now gets the interpreter from runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants