Hi Everyone,
To know the called app process is running, I have created a application which iterates through the processes available in the /proc and tries to open the cmdline file. Called app successfully launches and when tries to read cmdline of that particualar process file open result shows E_ILLEGAL_ACCESS. For all the remaining processes cmdline file opens successfully.
... Tizen::Io::File logFile; logFile.Construct(L"statfile", "a+"); Tizen::Io::File statFile; String strStatFileName; strStatFileName.Append(L"/proc/"); strStatFileName.Append(dir->d_name); // Process ID strStatFileName.Append(L"/cmdline"); result r = statFile.Construct(strStatFileName, L"r"); AppLog(" File Open result : %s", GetErrorMessage(r)); if(E_SUCCESS == r) { String strFileContent; statFile.Read(strFileContent); if(true == strFileContent.Contains(L"5JuPoKN5Pe")) { AppLog("Process ID of Called App :: %s", dir->d_name); AppLog("Called App cmdline File Content :: %S", strFileContent.GetPointer()); } } else { AppLog("File Not Opened."); } ...
AppLog shows:
11-26 13:55:25.992 : INFO / TizenSecondAppLaunching ( 3140 : 3140 ) : void processdir(const struct dirent *)(29) > File Open result : E_ILLEGAL_ACCESS 11-26 13:55:25.992 : INFO / TizenSecondAppLaunching ( 3140 : 3140 ) : void processdir(const struct dirent *)(43) > File Not Opened
Please provide me pointers to get the Called app running status.
Thanks,
Anil