X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=blobdiff_plain;f=launcher.c;h=0e48d4220edd1c57788b164902385c42046f2aa3;hp=819977ee95b2be61a6b7d1814ba6b66fbb0e3377;hb=870b63f0602922c0f135d3982f1febfe2706c243;hpb=e7bb0f3e07ebcb347539f050b229f4d88e7d3205 diff --git a/launcher.c b/launcher.c index 819977e..0e48d42 100644 --- a/launcher.c +++ b/launcher.c @@ -204,10 +204,6 @@ void launch_microb(struct swb_context *ctx, char *uri) { /* Release the osso_browser D-Bus name so that MicroB can take it */ dbus_release_osso_browser_name(ctx); - if ((pid = fork()) == -1) { - perror("fork"); - exit(1); - } #ifdef FREMANTLE /* Put together the path to the MicroB browserd lockfile */ if (!(homedir = getenv("HOME"))) @@ -243,6 +239,11 @@ void launch_microb(struct swb_context *ctx, char *uri) { } free(microb_profile_dir); + if ((pid = fork()) == -1) { + perror("fork"); + exit(1); + } + if (pid > 0) { /* Parent process */ /* Wait for our child to start the browser UI process and @@ -477,6 +478,11 @@ void launch_microb(struct swb_context *ctx, char *uri) { execl("/usr/bin/maemo-invoker", "browser", (char *)NULL); } #else /* !FREMANTLE */ + if ((pid = fork()) == -1) { + perror("fork"); + exit(1); + } + if (pid > 0) { /* Parent process */ waitpid(pid, &status, 0);