summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2021-03-23 00:49:28 -0700
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-03-24 16:46:45 +0900
commit7b7a060e83d6c7de8705904d71978ba4664f0a65 (patch)
treee03cae776c6710f46e22d86773f1448e35d8181a /po
parent7325a2b2d15af09a9389723d6153050130c0bd36 (diff)
downloadsystemd-7b7a060e83d6c7de8705904d71978ba4664f0a65.tar.gz
process-util: dont allocate max length to read /proc/PID/cmdline
Alternative title: Replace get_process_cmdline()'s fopen()/fread() with read_full_virtual_file(). When RLIMIT_STACK is set to infinity:infinity, _SC_ARG_MAX will return 4611686018427387903 (depending on the system, but definitely something larger than most systems have). It's impractical to allocate this in one go when most cmdlines are much shorter than that. Instead use read_full_virtual_file() which seems to increase the buffer depending on the size of the contents.
Diffstat (limited to 'po')
0 files changed, 0 insertions, 0 deletions