Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix ForkedFunc to handle hard exit(0) #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vermaport
Copy link

@vermaport vermaport commented Sep 30, 2020

  1. waitfinish() assumes that if the forked child process exited with exitstatus
    == 0, that _child() ran to completion and wrote out the retval. This is not true
    if the function run in the child process hard exited with status 0,
    e.g. os._exit(0) (or even sys.exit(0)).

  2. Add new unit test test_exit0() for this case.

  3. Fixes ForkedFunc raises EOFError if function exits with status 0 #261

1. waitfinish() assumes that if the forked child process exited with exitstatus
== 0, that _child() ran to completion and wrote out the retval. This is not true
if the function run in the child process hard exited with status 0,
e.g. os._exit(0) (or even sys.exit(0)).

2. Add new unit test test_exit0() for this case.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ForkedFunc raises EOFError if function exits with status 0
1 participant