// read string from external file and set them to environment value.
setEnvFromFile();
- // Set environment for System.Environment.SpecialFolder
- initEnvForSpecialFolder();
-
if (initializePathManager(std::string(), std::string(), std::string()) < 0) {
_ERR("Failed to initialize PathManager");
return -1;
if (!standalone)
pluginPreload();
+ // Set environment for System.Environment.SpecialFolder
+ // Below function creates dbus connection by callging storage API.
+ // If dbus connection is created bofere fork(), forked process cannot use dbus.
+ // To avoid gdbus blocking issue, below function should be called after fork()
+ initEnvForSpecialFolder();
+
fd = open("/proc/self", O_DIRECTORY);
std::string appRoot = std::string("/proc/self/fd/") + std::to_string(fd);
std::string appBin = concatPath(appRoot, "bin");