summaryrefslogtreecommitdiffstats
path: root/libprocessgroup
Commit message (Collapse)AuthorAgeFilesLines
* Fix backport of readdir patchWolfgang Wiedmeyer2016-12-091-4/+21
| | | | | | | Backport changes from Google's master to fix build errors when using readdir_r. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* Use readdir instead of readdir_r.Elliott Hughes2016-12-091-6/+4
| | | | | | | http://elliotth.blogspot.com/2012/10/how-not-to-use-readdirr3.html Test: boots. Change-Id: If75532e24fe4d17743bf8e8c9590156dee378a63
* processgroup: change the polling interval for killProcessGroup()Yusuke Sato2015-06-161-3/+4
| | | | | | | | | | to make the function faster on average. Since killing a process takes about 40-60ms on a recent device, the previous logic tends to sleep too long. This CL does not significantly change the total timeout (old code: 204ms, new code: 200ms). Bug: 21813611 Change-Id: Ica44b2437ccccaebadcf585d7a09d993ce71a499
* Remove uses of libcxx.mk.Dan Albert2015-03-271-1/+0
| | | | | | This is a no-op. Change-Id: Iecbcd5f6d818abbf98767a2e996c10f454b652e4
* Fix missing #includes in system/core.Elliott Hughes2014-12-291-0/+1
| | | | Change-Id: I4736e8c4f7bb8bb03640d26d58243efaa67dc75c
* Fix format stringChih-Hung Hsieh2014-11-201-3/+4
| | | | | | | Make a format string match the type of the parameter it represents Change-Id: I0af88636448084b56450996ea9dafdba3c1fd2a3 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org
* Make mkdirAndChown do what it claims to doBernhard Rosenkränzer2014-11-171-2/+2
| | | | | | | | | | | | | Currently, mkdirAndChown takes parameters for mode, uid and gid, but ignores them and hardcodes 0750, AID_SYSTEM, AID_SYSTEM instead. This doesn't matter much because so far its only invocation passes exactly those values as parameters -- but clang complains about unused parameters. Might as well make the function do what it claims to do. Change-Id: I5a8056be3278a0c5d0a576dbc061288aa0956a35 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
* Fix issue #18000467: processgroup truncates bufferDianne Hackborn2014-10-151-1/+1
| | | | Change-Id: I3d98a4da9c47d83d25a11ff0ef94cfcab1feabea
* Maybe fix issue #17969789: Shamu FR: Runtime restart while scrolling InstagramDianne Hackborn2014-10-132-5/+29
| | | | | | | | | | | | | | | | | It looks like there were a couple problems in the code: - It would not 0-terminate the string it read, to make sure we didn't see garbage at the end. - It didn't reduce buf_len as it processes data in the buffer, so if we need to read more we will increase the buffer length to be longer than the actual available data. Also put in some logs about every thing we kill, so we can see what is going on when debugging. And add a special check for us trying to kill pid 0 for any reason, since doing so seem to be terminal to the caller. Change-Id: I2fe29bfef08938b8a2eb182475c0705c14d8d84f
* processgroup: close directories opened by removeAllProcessGroups()Colin Cross2014-08-201-2/+3
| | | | | | | | | removeAllProcessGroups and removeUidProcessGroups were calling opendir, but never called closedir. This would leave a leaked file descriptor for every /acct/uid_* directory that existed at boot. Change-Id: Ia08eccd42d6ad7a6c1c78402519ac2e53b4fc83a
* Add libprocessgroupColin Cross2014-07-095-0/+436
libprocessgroup will allow Zygote to place processes in a cgroup, and then kill the process and all forked processes later. lmkd will also kill all forked processes. Bug: 15313911 Change-Id: I20404d0dbe448f1c475d2f4c61cccca462f9e544