Pfind, Pmusic, etc still running?
Pfind, Pmusic, etc still running?
I keep reading about these applications needing to be shut down 'properly' to prevent them from running in the background. From Pmusic experience, I guess this means that just closing the window is not enough, and the 'quit' or whatever command must be used to kill the process? If one just closes the window, does this mean that when activating the program again, a second instance is initiated, or does the original which is running in the background, reappear?
Spup Frugal HD and USB
Root forever!
Root forever!
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Well, zigbert can answer this better than me. I know there are issues with processes left running and that annoys me when I want to unmount a partition. I don't know if it affects anything when you want to rerun the application.
It may be that those apps need to have the user interface redesigned to remove this problem. I think it is because of the pulldown menus.
Or, it may be possible to create a workaround to fix it. There can be a wrapper for the actual application. When the app is killed, execution returns to the wrapper which then makes sure all processes are killed before exiting. Well, that is more than possible, its doable.
It may be that those apps need to have the user interface redesigned to remove this problem. I think it is because of the pulldown menus.
Or, it may be possible to create a workaround to fix it. There can be a wrapper for the actual application. When the app is killed, execution returns to the wrapper which then makes sure all processes are killed before exiting. Well, that is more than possible, its doable.
[url]https://bkhome.org/news/[/url]
I'll look into this in the weekend. Just too busy these days.BarryK wrote:Or, it may be possible to create a workaround to fix it. There can be a wrapper for the actual application. When the app is killed, execution returns to the wrapper which then makes sure all processes are killed before exiting. Well, that is more than possible, its doable.
Sigmund
I have made a simple workaround that kills pid after closing gtkdialog-script (including drop-down menu). This example is Pburn. I have edited the startup-script in /usr/bin/. Since I'm not really a programmer, I would like someone with more knowledge to look through the codelines. There could be many other ways to do this, that are much better. - I don't know, just happy it works.
I will include this (or another) workaround in the next release of
Pburn
Pmusic
Pfind
Pbackup
Pwidgets
Hopefully other Pscripts with same issue could use this.
Pdvdrsab
Pcdripper
Pmetatagger
Psip
Pctorrent
Wallpaper
Sigmund
I will include this (or another) workaround in the next release of
Pburn
Pmusic
Pfind
Pbackup
Pwidgets
Hopefully other Pscripts with same issue could use this.
Pdvdrsab
Pcdripper
Pmetatagger
Psip
Pctorrent
Wallpaper
Code: Select all
#!/bin/bash
"/usr/local/pburn/pburn" "$@" &
#Start loop to kill PID when window closes.
#This is a workaround for a bug in gtkdialog.
sleep 10
while [ A != B ]; do
TMP="`xwininfo -stats -name Pburn`"
if [ ! "$TMP" ]; then
for I in `ps | grep Pburn | grep gtkdialog | awk '{print $1}'`; do kill -9 $I 2> /dev/null; done
for I in `ps | grep -i pburn | awk '{print $1}'`; do kill -9 $I 2> /dev/null; done
exit 0
fi
sleep 3
done
Sigmund
Don't know if this is related/helps but you maybe want to have a look at
line 343 ff
aragon
Code: Select all
/usr/local/bin/prename
Code: Select all
...
RESULTS="`$GTKDIALOG --program=MAIN_DIALOG --center`"
###exit the program if the X button is pushed
if [ "`echo $RESULTS | grep abort`" != "" ]; then
exit 0
fi
##incase quit was selected, let's exit the program
if [ "`echo $RESULTS | grep EXIT_NOW`" != "" ]; then
exit 0
fi
...
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
aragon
Prename does not have the same issue, because it has no menus. the Prename script gets the control back after child process is done. - That's why I have started a loop instead of waiting for child-process to return to parent.
trio
The main issue is not the killing, but to scan X to see if pburn-window is actually up. Your (mine ) code is simpler, but I had some trouble in the past killing ALL child processes. That was with Pfind, - and I still have the same problems, so your code might fit better in the end. I guess my 2 'for-loops' takes much more time than your grep.
Thanks for input !!!!!
Sigmund
Prename does not have the same issue, because it has no menus. the Prename script gets the control back after child process is done. - That's why I have started a loop instead of waiting for child-process to return to parent.
trio
The main issue is not the killing, but to scan X to see if pburn-window is actually up. Your (mine ) code is simpler, but I had some trouble in the past killing ALL child processes. That was with Pfind, - and I still have the same problems, so your code might fit better in the end. I guess my 2 'for-loops' takes much more time than your grep.
Thanks for input !!!!!
Sigmund
ok, starting to understand the problem a litlle bit...
aragon
aragon
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Hi, I just want to mention that the P series apps have brought a lot of useability to puppy linux, from what I have seen of the end users I have using 4 series puppy. Zig, you definetely qualify as a "programmer" in my book.
I hope someone with a bit more in-depth knowledge helps you sort these problems out, and lets you get back to designing great front ends!
I hope someone with a bit more in-depth knowledge helps you sort these problems out, and lets you get back to designing great front ends!
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]
Sorry, my server is down atm!
Sorry, my server is down atm!
Hi,
just wanna share a workaround, will kill all gtkdialog at start up, or supposed to just try
just wanna share a workaround, will kill all gtkdialog at start up, or supposed to just try
- Attachments
-
- gtkdialogkiller.pet
- (432 Bytes) Downloaded 674 times
This problem has been fixed by Zigbert in 0.8 which he just released. It needs testing though (like anything with a zero on the end).
Get it from here.
http://www.murga-linux.com/puppy/viewtopic.php?t=31206
Get it from here.
http://www.murga-linux.com/puppy/viewtopic.php?t=31206
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]
Sorry, my server is down atm!
Sorry, my server is down atm!