Title: fix(audio): stop desktop player by PID, not pkill -f (no cross-kill) by jnuyens · Pull Request #178 · MicroPythonOS/MicroPythonOS · GitHub
Open Graph Title: fix(audio): stop desktop player by PID, not pkill -f (no cross-kill) by jnuyens · Pull Request #178 · MicroPythonOS/MicroPythonOS
X Title: fix(audio): stop desktop player by PID, not pkill -f (no cross-kill) by jnuyens · Pull Request #178 · MicroPythonOS/MicroPythonOS
Description: Follow-up to the desktop-audio player (#175).
Problem
The desktop (non-ESP32) WAVStream branch backgrounded an external player
(afplay/ffplay/aplay/paplay) and stopped it with:
os.system("pkill -f %s" % _shell_quote(self.file_path))
pkill -f matches any process whose command line contains that path, so it
can kill unrelated processes, or cross-kill a second player of the same file.
Fix
Record the backgrounded player's PID via the shell's $! into a per-stream pid
file at launch, and stop it by that exact PID:
cmd = "... >/dev/null 2>&1 & echo $! >
Open Graph Description: Follow-up to the desktop-audio player (#175). Problem The desktop (non-ESP32) WAVStream branch backgrounded an external player (afplay/ffplay/aplay/paplay) and stopped it with: os.system("pkil...
X Description: Follow-up to the desktop-audio player (#175). Problem The desktop (non-ESP32) WAVStream branch backgrounded an external player (afplay/ffplay/aplay/paplay) and stopped it with: os.system("...
Opengraph URL: https://github.com/MicroPythonOS/MicroPythonOS/pull/178
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8c86f646-e308-3e9c-31f2-0d932fecb126 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8FDC:73358:1CBD5A:2848D1:6A50F2AC |
| html-safe-nonce | f5c5f4b3672ced7e3e718c75c8a28fff43f26a665f66de1670139e613fc2493b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkRDOjczMzU4OjFDQkQ1QToyODQ4RDE6NkE1MEYyQUMiLCJ2aXNpdG9yX2lkIjoiMTk1ODIzMjQ3ODU5NTQ3ODE4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bbf21e70de6f3bc4b592a18c8231ac3423d8a0ceb4824f4168b9bfd798f52aac |
| hovercard-subject-tag | pull_request:3951815194 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/MicroPythonOS/MicroPythonOS/pull/178/files |
| twitter:image | https://avatars.githubusercontent.com/u/3696148?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3696148?s=400&v=4 |
| og:image:alt | Follow-up to the desktop-audio player (#175). Problem The desktop (non-ESP32) WAVStream branch backgrounded an external player (afplay/ffplay/aplay/paplay) and stopped it with: os.system("pkil... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/MicroPythonOS/MicroPythonOS git https://github.com/MicroPythonOS/MicroPythonOS.git |
| octolytics-dimension-user_id | 213598128 |
| octolytics-dimension-user_login | MicroPythonOS |
| octolytics-dimension-repository_id | 975472483 |
| octolytics-dimension-repository_nwo | MicroPythonOS/MicroPythonOS |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 975472483 |
| octolytics-dimension-repository_network_root_nwo | MicroPythonOS/MicroPythonOS |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5ec60191a48933536a90c8a19f47142fcd0d4739 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width