#include "amd_util.h"
#define PATH_AUL_DAEMONS "/run/aul/daemons"
+#define LAUNCHPAD_PROCESS_POOL_SOCK_READY ".launchpad-process-pool-sock"
#define LOGIN_TIMEOUT_SEC 90
#define FILE_SYSTEMD "systemd"
#define FILE_USERS "users"
//TODO(Abstract Socket Issue): replace file-based setup check
snprintf(path, sizeof(path), "%s/%d/%s",
- PATH_AUL_DAEMONS, uid, LAUNCHPAD_PROCESS_POOL_SOCK);
+ PATH_AUL_DAEMONS, uid, LAUNCHPAD_PROCESS_POOL_SOCK_READY);
if (access(path, F_OK) != 0) {
_D("%s doesn't exist", path);
return;
constexpr const char AUL_DBUS_SIGNAL_INTERFACE[] = "org.tizen.aul.signal";
constexpr const char AUL_DBUS_APPDEAD_SIGNAL[] = "app_dead";
constexpr const char AUL_DBUS_APPLAUNCH_SIGNAL[] = "app_launch";
-constexpr const char kLaunchpadProcessPoolSock[] =
+constexpr const char LAUNCHPAD_PROCESS_POOL_SOCK_READY[] =
".launchpad-process-pool-sock";
class GarbageCollector : public Worker::Job {
}
bool Launchpad::ListenSigchld() {
- std::string path = GetEndpoint(uid_, kLaunchpadProcessPoolSock);
- if (access(path.c_str(), F_OK) != 0) {
- _W("%s doesn't exist", path.c_str());
+ std::string sock_ready = GetEndpoint(uid_, LAUNCHPAD_PROCESS_POOL_SOCK_READY);
+ if (access(sock_ready.c_str(), F_OK) != 0) {
+ _W("%s doesn't exist", sock_ready.c_str());
return false;
}
}
bool RequestManager::Init() {
+ constexpr const char kAmdSockReady[] = "/run/aul/daemons/.amd-sock";
int marker;
amd_fd_ = _create_sock_activation();
}
// TODO(Abstract Socket Issue): file-based socket check
- marker = open("/run/aul/daemons/.amd-sock", O_RDWR | O_CREAT,
+ marker = open(kAmdSockReady, O_RDWR | O_CREAT,
S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
close(marker);