summaryrefslogtreecommitdiff
path: root/libutils/ProcessCallStack.cpp
diff options
context:
space:
mode:
authorAdrian Salido <salidoa@google.com>2016-12-20 15:52:15 -0800
committerAdrian Salido <salidoa@google.com>2017-01-03 13:11:29 -0800
commit24ef8601c203a28b85a5e9168e5bada713e6a8f1 (patch)
tree1a8b467bf99c86af287d0baae0697126723db08e /libutils/ProcessCallStack.cpp
parent8a1c4b85303cd636f4920f99093063f57ecc8e73 (diff)
init/service.cpp: fix access check for console
Commit 9596d2b95d3137c476be4b7c15c47c62ef5cbe09 changes how availability of console is checked by only checking access bits for the console device. However, in cases where there is no console it defaults to /dev/console. This device is always enumerated by tty driver (i.e. file and access bits may be correct), but it doesn't always map to an underlying console driver. Because the lookup for the underlying console driver happens during the open system call, checking only the access bits is not sufficient and need to make sure open system call is successful, we can safely close the FD afterwards to avoid FD leaks. Test: boot device and check console svc doesn't continuously restart Bug: 33691649 Change-Id: Ia51a8a2f56c345b70db55e95f61a057a98b52895
Diffstat (limited to 'libutils/ProcessCallStack.cpp')
0 files changed, 0 insertions, 0 deletions