#include <sys/param.h> /* for MAXPATHLEN */
#include <string.h>
#include <vlc_keys.h>
+#include <spawn.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
[[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);
}