[Fix] Fetch proper app_id for creation of cgroup. 00/153900/3
authorNishant Chaprana <n.chaprana@samsung.com>
Wed, 11 Oct 2017 05:32:29 +0000 (11:02 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Wed, 11 Oct 2017 05:33:46 +0000 (11:03 +0530)
commit951a7b00437655c92d1a998c4e1ed4353010eb0b
tree78e80cff6272613c06f7bda7e19ed0a1a8a11718
parent754b1ad89442526794acd69a395aa08a5bfc17e1
[Fix] Fetch proper app_id for creation of cgroup.

Description: The app_id was not extracted properly from procfs.
Some processes run with help of other daemons, for example
org.tizen.browser app is execued using efl_webprocess.

In this patch for resolving above issue,
if /proc/<pid>/attr/current file contains "User::Pkg::" wildcard string,
then we extract app_id from above file.
Otherwise we read /proc/<pid>/cmdline and fetch process_name as app_id.

Change-Id: I0eb46f4f675cec3f2323c0ab05388fec46c7781f
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
include/stc-plugin.h
packaging/stc-manager.spec
plugin/stc-plugin.c
src/helper/helper-inotify.h
src/helper/helper-procfs.c
src/helper/helper-procfs.h
src/monitor/include/stc-monitor.h
src/monitor/stc-app-lifecycle.c
src/monitor/stc-monitor.c