My problem is with FBI (frame buffer image viewer) for Linux, but my question and any answers are perhaps applicable to more than only that program. I don't know. Anyway…
While things are loading on my Raspberry Pi, I display a "Loading screen" through HDMI using FBI. The command in my Bash script is:
/usr/bin/fbi -T 1 -noverbose -a /etc/splash/splashscreen.png
After a couple of days, I notice that I get an "Out of memory" error instead of the splash screens. It turns out every time a splash screen was displayed, a new instance of FBI was loaded. So there were 50 frame buffer image viewers open causing the memory error, I guess.
Is there any way of making sure a new instance of a program isn't opened when I call for it, or will I have to do something like:
pkill fbi
/usr/bin/fbi -T 1 -noverbose -a /etc/splash/splashscreen.png