X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=blobdiff_plain;f=launcher.c;h=8bffd71ebaaabe9efcf6853eb020112dad365093;hp=67598139b9c78f9f3dc52e04cf1f3ce93687b5ce;hb=949afa83df1cc73aea015e406e83dd3503423a46;hpb=aea8af77e9b8614776a3be05a4dff86ea25063f6 diff --git a/launcher.c b/launcher.c index 6759813..8bffd71 100644 --- a/launcher.c +++ b/launcher.c @@ -32,6 +32,7 @@ #ifdef FREMANTLE #include +#include #endif #include "browser-switchboard.h" @@ -296,6 +297,7 @@ void launch_microb(struct swb_context *ctx, char *uri) { exit(1); } } + g_object_unref(g_proxy); /* Workaround: the browser process we started is going to want to hang around forever, hogging the com.nokia.osso_browser @@ -359,20 +361,10 @@ void launch_microb(struct swb_context *ctx, char *uri) { dbus_connection_close(raw_connection); dbus_connection_unref(raw_connection); - /* Tell browser UI to exit nicely */ - printf("Closing MicroB\n"); - if (!dbus_g_proxy_call(g_proxy, "exit_browser", &gerror, - G_TYPE_INVALID, G_TYPE_INVALID)) { - /* We don't expect a reply; any other error indicates - a problem */ - if (gerror->domain != DBUS_GERROR || - gerror->code != DBUS_GERROR_NO_REPLY) { - printf("exit_browser failed: %s\n", - gerror->message); - exit(1); - } - } - g_object_unref(g_proxy); + /* Kill off browser UI + XXX: Hope we don't cause data loss here! */ + printf("Killing MicroB\n"); + kill(pid, SIGTERM); } else { /* Child process */ close_stdio();