Projects STRLCPY criu Commits 3ca979f9
🤬
  • 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 <[email protected]>
  • Loading...
  • Adrian Reber committed with Andrei Vagin 1 year ago
    3ca979f9
    1 parent a0cc95c0
  • ■ ■ ■ ■ ■
    coredump/criu_coredump/coredump.py
    skipped 314 lines
    315 315   prpsinfo.pr_ppid = pstree["ppid"]
    316 316   prpsinfo.pr_pgrp = pstree["pgid"]
    317 317   prpsinfo.pr_sid = pstree["sid"]
    318  - prpsinfo.pr_psargs = self._gen_cmdline(pid)
     318 + # prpsinfo.pr_psargs has a limit of 80 characters which means it will
     319 + # fail here if the cmdline is longer than 80
     320 + prpsinfo.pr_psargs = self._gen_cmdline(pid)[:80]
    319 321   if (sys.version_info > (3, 0)):
    320 322   prpsinfo.pr_fname = core["tc"]["comm"].encode()
    321 323   else:
    skipped 524 lines
Please wait...
Page is in error, reload to recover