Commit 492acf7f authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #1776 from javierhonduco/execsnoopp-argv-one-line

execsnoop: don't print newlines in argv
parents 2867473e 5340c21b
......@@ -213,8 +213,9 @@ def print_event(cpu, data, size):
print("%-8.3f" % (time.time() - start_ts), end="")
ppid = get_ppid(event.pid)
ppid = b"%d" % ppid if ppid > 0 else b"?"
argv_text = b' '.join(argv[event.pid]).replace(b'\n', b'\\n')
printb(b"%-16s %-6d %-6s %3d %s" % (event.comm, event.pid,
ppid, event.retval, b' '.join(argv[event.pid])))
ppid, event.retval, argv_text))
try:
del(argv[event.pid])
except Exception:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment