Commit 03a3319a authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Properly relaunch VLC when asked for.

parent ff396357
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <sys/param.h> /* for MAXPATHLEN */ #include <sys/param.h> /* for MAXPATHLEN */
#include <string.h> #include <string.h>
#include <vlc_keys.h> #include <vlc_keys.h>
#include <spawn.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
...@@ -2270,7 +2271,11 @@ end: ...@@ -2270,7 +2271,11 @@ end:
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
/* Relaunch now */ /* 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); exit(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment