calling shell scripts creates zombie processes

All the topics related to QLC+ on the Raspberry Pi
Post Reply
uriebe
Posts: 2
Joined: Sun Dec 22, 2024 12:15 am
Real Name: Ulrich

Raspberry PI 4 running Bullseye
and
QLC+ 4.12.3 (installed via APT)

the system and QLC runs 24/7 like a charm - except:

in the virtual console i implemented some buttons - each of them triggering a shell (BASH) script like:
systemcommand:/home/pi/camera_on.sh

with the script

Code: Select all

#!/bin/bash
libcamera-hello --width 800 --height 600 -t 0 --ev 1 --brightness 0.1 --contrast 1 --framerate 12
exit 0
each script call resulting in a zombie process

Code: Select all

pi@pimobile01:~$ ps aux | grep defunct
pi        3500  0.0  0.0      0     0 ?        Z    Jan01   0:00 [camera_on.sh] <defunct>
pi        3595  0.0  0.0      0     0 ?        Z    Jan01   0:00 [camera_off.sh] <defunct>
pi        4178  0.0  0.0      0     0 ?        Z    Jan01   0:00 [camera_on.sh] <defunct>
pi        4205  0.0  0.0      0     0 ?        Z    Jan01   0:00 [video_play.sh] <defunct>
pi        4217  0.0  0.0      0     0 ?        Z    Jan01   0:00 [video_stop.sh] <defunct>
pi        4223  0.0  0.0      0     0 ?        Z    Jan01   0:00 [bmr_116_on.sh] <defunct>
pi        4228  0.0  0.0      0     0 ?        Z    Jan01   0:00 [bmr_116_off.sh] <defunct>
pi        4233  0.0  0.0      0     0 ?        Z    Jan01   0:00 [bmr_116_blackou] <defunct>
pi        4235  0.0  0.0      0     0 ?        Z    Jan01   0:00 [bmr_116_blackof] <defunct>
pi        5862  0.0  0.0      0     0 ?        Z    Jan01   0:00 [camera_off.sh] <defunct>
those processes get deleted when i close QLC+.
but i want to keep it running.
double forking did not help.

i guess it's QLC that should check (via "wait"?) its' subprocesses...

did anyone encounter this behaviour or has any clue how to prevent zombie processes?

thanks and greetings.
User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Use the latest QLC+ version.
uriebe
Posts: 2
Joined: Sun Dec 22, 2024 12:15 am
Real Name: Ulrich

grazie, massimo,

i got the latest stable version for Bullseye now and everything is fine.

no more zombies with 4.12.7
Post Reply