From: Pierre d'Herbemont Date: Tue, 16 Sep 2008 07:35:09 +0000 (+0200) Subject: macosx: Properly relaunch VLC when asked for. X-Git-Tag: 1.0.0-pre1~3226 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=03a3319a05f8e8d8ac5bdc2e9fb993c2276aa186;p=vlc macosx: Properly relaunch VLC when asked for. --- diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index ba8d2f21b3..ad0143bc40 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -31,6 +31,7 @@ #include /* for MAXPATHLEN */ #include #include +#include #ifdef HAVE_CONFIG_H # include "config.h" @@ -2270,7 +2271,11 @@ end: [[NSUserDefaults standardUserDefaults] synchronize]; /* Relaunch now */ - [[NSWorkspace sharedWorkspace] launchApplication:[[NSBundle mainBundle] bundlePath]]; + const char * path = [[[NSBundle mainBundle] executablePath] UTF8String]; + const char *spawnedArgs[2] = { path, NULL }; + char *spawnedEnv[] = {NULL}; + + posix_spawn(NULL, path, NULL, NULL, spawnedArgs, spawnedEnv); exit(0); }