Make sure a running browserd is detected correctly on all devices
authorSteven Luo <steven+maemo@steven676.net>
Fri, 5 Feb 2010 12:32:01 +0000 (04:32 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Sat, 6 Feb 2010 10:25:02 +0000 (02:25 -0800)
`pidof /usr/sbin/browserd` doesn't work on at least one user's device;
`pidof browserd` works everywhere without exception, so use that
instead.

Reported by Faheem Pervez (qwerty12).

launcher.c

index feef231..6759813 100644 (file)
@@ -179,7 +179,7 @@ void launch_microb(struct swb_context *ctx, char *uri) {
        printf("launch_microb with uri '%s'\n", uri);
 
        /* Launch browserd if it's not running */
-       status = system("pidof /usr/sbin/browserd > /dev/null");
+       status = system("pidof browserd > /dev/null");
        if (WIFEXITED(status) && WEXITSTATUS(status)) {
                kill_browserd = 1;
 #ifdef FREMANTLE
@@ -408,7 +408,7 @@ void launch_microb(struct swb_context *ctx, char *uri) {
 
        /* Kill off browserd if we started it */
        if (kill_browserd)
-               system("kill `pidof /usr/sbin/browserd`");
+               system("kill `pidof browserd`");
 
        if (!ctx || !ctx->continuous_mode) 
                exit(0);