question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Child process dont finished when parent close

See original GitHub issue
  • Nuitka version, full Python version and Platform (Windows, OSX, Linux …)

python -m nuitka --version 0.6.11.2 Python: 3.8.6 (default, Oct 1 2020, 13:01:33) [GCC 10.2.0 64 bit (AMD64)] Executable: D:/PYTHON/picta-dl/env/bin/python.exe OS: Windows Arch: x86_64

  • How did you install Nuitka and Python

Using virtualenv

#!/usr/bin/env python
# child.py
#   Compile with Nuitka:
#   python -m nuitka --onefile --mingw64 --assume-yes-for-downloads --windows-company-name=MyCompany --windows-product-name=child --windows-product-version=1.0.0.0 --windows-file-description="Child" child.py 


import time


def main_ok():
    try:
        while True:
            print('Im working...')
            time.sleep(2)
    except KeyboardInterrupt:  
        print('Exit from child!')

def main():
    # Dont work with CTRL_C_EVENT ??!
    while True:
        print('Im working...')
        time.sleep(2)


if __name__ == '__main__':
    main()
  • Freeze

python -m pip freeze Nuitka==0.6.11.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Feb 13, 2021

Released as part of 0.6.12

1reaction
kayhayencommented, Feb 8, 2021

Part of the current pre-release, I expect to make a release relatively soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why child process not getting exited before parent process ...
Upon exit, the child leaves an exit status that should be returned to the parent. So, when the child finishes it becomes a...
Read more >
Closing different ends in a pipe - Unix & Linux Stack Exchange
Why? If the parent process does not close the write-end of the pipe, then the child will block forever in the call to...
Read more >
Exit status of a child process in Linux - GeeksforGeeks
Upon exit, the child leaves an exit status that should be returned to the parent. So, when the child finishes it becomes a...
Read more >
Child process | Node.js v19.3.0 Documentation
child_process.exec() : spawns a shell and runs a command within that shell, passing the stdout and stderr to a callback function when complete....
Read more >
Does a Child Process Stop a Python Program From Exiting
In this tutorial you will discover whether a running child process can prevent a program from exiting in Python. Let's get started.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found