Package: mkchromecast Version: 0.3.8.1-1 Severity: normal Dear Maintainer,
mkchromecast always creates a pidfile a) in the fixed location /tmp/mkcchromecast.pid b) aborts if it can't write that file c) doesn't clean up the pidfile on exit.[1] This breaks the following use cases: 1) several user accounts using mkchromecast at different points in time: /tmp/mkcchromecast.pid owned by the first user to start mkchromecast remains and blocks usage by everyone else until /tmp is cleared) 2) using several instances of mkchromecast to stream to several devices simultaneously. Also, afaics mkchromecast doesn't expect to be sent signals from users anyway[2]: the pidfile is only used to pass a pid around among different threads of mkchromecast itself. If that's a correct assesment, then mkchromecast should not use a pidfile at all, and just handle the pid in python code[3]. Otherwise, the pidfile should be made optional and/or its location configurable, and the cleanup-on-exit made to work. Finally, | if os.path.exists('/tmp/mkchromecast.pid') is True: | os.remove('/tmp/mkchromecast.pid') | f = open('/tmp/mkchromecast.pid', 'wb') looks fishy to me. Shouldn't opening 'wb' or 'w+b' be enough? (Unless the file has u-w mode, in which case something is off already.) thank you for maintaining mkchromecast, Jan [1] Looking at the source reveals an attempt to delete it, however. I didn't further investigate why that fails here. [2] Besides the usual SIGINT/SIGTERM to tell it to quit. [3] I'd like to point out that even a python global variable is "not as global" as the file /tmp/mkcchromecast.pid ;) -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (650, 'testing-debug'), (550, 'unstable-debug'), (550, 'unstable'), (10, 'experimental-debug'), (10, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores) Locale: LANG=C.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages mkchromecast depends on: ii flac 1.3.2-3 ii gir1.2-notify-0.7 0.7.7-4 ii lame 3.100-2+b1 ii nodejs 10.15.2~dfsg-2 ii opus-tools 0.1.10-1 ii python3 3.7.3-1 ii python3-flask 1.0.2-3 ii python3-psutil 5.5.1-1 ii python3-pychromecast 2.4.0-1 ii python3-pyqt5 5.11.3+dfsg-1+b3 ii sox 14.4.2+git20190427-1 ii vorbis-tools 1.4.0-11 ii youtube-dl 2019.07.02-1 mkchromecast recommends no packages. Versions of packages mkchromecast suggests: ii ffmpeg 7:4.1.3-1 pn libav-tools <none> ii mkchromecast-alsa 0.3.8.1-1 pn mkchromecast-pulseaudio <none> -- no debconf information
signature.asc
Description: PGP signature