Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix: Ensure subprocess is killed on linux #500

Merged
merged 2 commits into from
May 23, 2022
Merged

Conversation

LordOfPolls
Copy link
Member

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

On Linux the Audio subproccess was not exiting successfully, resulting in zombie processes being left behind. This should resolve this, without impacting Windows.

I also found that the read_ahead task was not being cancelled either, this fixes that too.

Changes

  • Set subprocess stdin to DEVNULL
  • Check if child process is runnning in _read_ahead
  • Add check for child process state in cleanup

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@LordOfPolls LordOfPolls added the Bug::Library A bug in the library label May 22, 2022
@LordOfPolls
Copy link
Member Author

Unless there are any objections this PR will be merged. My tests shows it resolves the aforementioned issue

@LordOfPolls LordOfPolls mentioned this pull request May 23, 2022
7 tasks
@LordOfPolls LordOfPolls merged commit 07420a1 into dev May 23, 2022
@LordOfPolls LordOfPolls deleted the ensure-subprocess-death branch May 23, 2022 17:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug::Library A bug in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant