Notices


Reply
Thread Tools
Gusse's Avatar
Posts: 168 | Thanked: 206 times | Joined on Apr 2010 @ Finland
#131
Originally Posted by MasterZap View Post
No, this should not happen. Which build are you running? Are you starting it from the icon or command line? And if from the command line, are you "user" or "root" when doing so?

/Z
Program is started from menu icon, not command line.
Same issue with versions: 0.9.4-36 & 0.9.4-37.

Last edited by Gusse; 2011-05-24 at 09:58.
 
Posts: 214 | Thanked: 140 times | Joined on Aug 2010
#132
Originally Posted by morti View Post
Short answer:

Makes perfect sense in my opinion, this is how I would expect it to work and I bet everyone already has it configured this way.
I would go with mode b).
Thinking about it some more, I actually disagree.

If I said "no" to background updates (by unchecking it) I then per definition want nothing to happen "in the background", regardless if the app is running or not... so for example, if I am composing a nice manual check in to the location I'm at, I don't want to be preempted by some auto-check in in the back. Or I may be turning it off for bandwidth reasons, or whatever.

Remember you can still MANUALLY check in, even if the daemon isn't running.

The only thing you are missing is Latitude updates.... but also remember, these explicitly live in the user interface behind the "Run in background" checkbox... which is off. Sould latitude updates still happen? Methinks not!

Then I'd rather add an explicit manual latitude update mode for that case.

So I decided that "run in background=OFF" really means the daemon is completely off.

Originally Posted by morti View Post
Long answer:

There are two separate cases in mode b):

- If you don't have the background daemon running, you are probably starting the main program in order to update your position and to see the map/check in - daemon should be on while the main program is running.
You need no daemon to manually check in (except for Latitude, which is a special case)

Originally Posted by morti View Post
My humble (and possibly too laborious) suggestion is:
Keep the background daemon and the main program daemon separate from each other. When the user starts the main program, you could suspend the background daemon until the main program is closed. The settings should be separate as well, as the use cases for using the background daemon and running the main program are typically rather different.
This is sort of what is happening. Check ins that happen when you press the "Check In" button is a different thing than the daemon auto-checking you in.

All that is missing really is a manual way to check in to Latitude.... which is quite easy to add.

/Z
 
Posts: 13 | Thanked: 1 time | Joined on Feb 2010
#133
Thanks for the clarification, it seems I had a slightly different idea about what running the daemon means. Taking your description into account, this does make sense - I also wouldn't want auto check-ins to happen while I'm running the main program.

As you said, the only thing missing with your description is a way to update latitude without the daemon - manual check ins for this sounds like a good solution.
 
Posts: 214 | Thanked: 140 times | Joined on Aug 2010
#134
Originally Posted by Gusse View Post
Program is started from menu icon, not command line.
Same issue with versions: 0.9.4-36 & 0.9.4-37.
That's odd. Doesn't happen here. Do you have the updated busybox, by any chance?

What does this line print for you:

Code:
ps -a | grep "zaploc-daemon"

EDIT: Try build 0.9.4-39.


/Z

Last edited by MasterZap; 2011-05-24 at 10:38.
 

The Following User Says Thank You to MasterZap For This Useful Post:
Gusse's Avatar
Posts: 168 | Thanked: 206 times | Joined on Apr 2010 @ Finland
#135
Originally Posted by MasterZap View Post
That's odd. Doesn't happen here. Do you have the updated busybox, by any chance?
Yes I have. Is this a problem? Should I revert back?

Originally Posted by MasterZap View Post
What does this line print for you:

Code:
ps -a | grep "zaploc-daemon"

EDIT: Try build 0.9.4-39.


/Z
Using 0.9.4-39.
If background service is OFF, then it shutdown OK (no ghost program running in backgroung)
If background service is ON, then
Code:
~ $ ps -w|grep "zaploc-daemon"
3815 user 50968 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
3951 user 50820 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4066 user 50824 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4130 user 2832 S grep zaploc-daemon
Above is after 3rd time closing ZapLoc. Each time a new daemon is added.
 
Posts: 214 | Thanked: 140 times | Joined on Aug 2010
#136
Originally Posted by Gusse View Post
Yes I have. Is this a problem? Should I revert back?
Other people have had the same issue w. new busybox, but it was due to a wrong "ps -e | grep" line I used (-e not a proper option in new busybox, and it was wrong anyway, was supposed to be -a)

However, that should have been fixed in 39... :/ Strange.

Originally Posted by Gusse View Post
Using 0.9.4-39.
If background service is OFF, then it shutdown OK (no ghost program running in backgroung)
If background service is ON, then
Code:
~ $ ps -w|grep "zaploc-daemon"
3815 user 50968 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
3951 user 50820 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4066 user 50824 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4130 user 2832 S grep zaploc-daemon
Above is after 3rd time closing ZapLoc. Each time a new daemon is added.
What's "-w", I wonder? "-a" (all users) is what I would have expected to use....?

If you start ZapLoc from xterm and see what it prints ("Starting Daemon", "Stopping Daemon" etc. like that) would be helpful. Ideally run as "user", not "root".

Actually the exact output of this would be very helpful:
Code:
ps -a | grep "python.*zaploc-daemon.py" | grep -v grep | awk '{print $1}'
/Z

Last edited by MasterZap; 2011-05-24 at 11:37.
 

The Following User Says Thank You to MasterZap For This Useful Post:
Gusse's Avatar
Posts: 168 | Thanked: 206 times | Joined on Apr 2010 @ Finland
#137
Originally Posted by MasterZap View Post
Other people have had the same issue w. new busybox, but it was due to a wrong "ps -e | grep" line I used (-e not a proper option in new busybox, and it was wrong anyway, was supposed to be -a)

However, that should have been fixed in 39... :/ Strange.



What's "-w", I wonder? "-a" (all users) is what I would have expected to use....?

If you start ZapLoc from xterm and see what it prints ("Starting Daemon", "Stopping Daemon" etc. like that) would be helpful. Ideally run as "user", not "root".

/Z
There seems to be only one option in the new busybox for ps and it is -w, -a is not valid (w = wide output). Don't know why this modifications is done?
Code:
~ $ ps --help
BusyBox v1.18.4 (Debian 1.18.4power4) multi-call binary.

Usage: ps

Show list of processes

Options:
w Wide output

Last edited by Gusse; 2011-05-24 at 11:41.
 
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#138
IMO, for the paranoid, app should use a flag. E.g., a file on disk, created on start, deleted on end, or, better, locked when app starts.

Daemon doesn't updte if file isn't locked, so start and stop daemon is only a matter of resources, not security. So even if it doesn't stop right, it simply sits there.

ETA: App closing could check daemon has stopped. Exiting could issue a kill and inform user it's done or not via a ps | grep
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 
Gusse's Avatar
Posts: 168 | Thanked: 206 times | Joined on Apr 2010 @ Finland
#139
Uninstalled "Enhanced Busybox 1.18.4" and now ZapLoc works OK.
Thanks for your help!

Edit: I tried once again with new BusyBox with procps installed, which brings better ps tool, but still not working as it should.

Last edited by Gusse; 2011-05-25 at 09:16.
 
Posts: 214 | Thanked: 140 times | Joined on Aug 2010
#140
Ok, then I will remove "-a", I must have misunderstood the earlier poster about the problems w. new busybox "ps". It seems the current busybox actually ignores all options anyway (gladly takes "-klptzyxm") so it doesn't matter anyway....

Will be fixed later....

/Z
 

The Following 2 Users Say Thank You to MasterZap For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 10:19.