mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
coredump: handle long command-lines
This fixes errors with long command-lines:
File "/home/criu/coredump/criu_coredump/coredump.py", line 320, in _gen_prpsinfo
prpsinfo.pr_psargs = self._gen_cmdline(pid)
^^^^^^^^^^^^^^^^^^
ValueError: bytes too long (88, maximum length 80)
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
a0cc95c03e
commit
3ca979f9a1
1 changed files with 3 additions and 1 deletions
|
|
@ -315,7 +315,9 @@ class coredump_generator:
|
|||
prpsinfo.pr_ppid = pstree["ppid"]
|
||||
prpsinfo.pr_pgrp = pstree["pgid"]
|
||||
prpsinfo.pr_sid = pstree["sid"]
|
||||
prpsinfo.pr_psargs = self._gen_cmdline(pid)
|
||||
# prpsinfo.pr_psargs has a limit of 80 characters which means it will
|
||||
# fail here if the cmdline is longer than 80
|
||||
prpsinfo.pr_psargs = self._gen_cmdline(pid)[:80]
|
||||
if (sys.version_info > (3, 0)):
|
||||
prpsinfo.pr_fname = core["tc"]["comm"].encode()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue