Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execsnoop: don't print newlines in argv #1776

Merged
merged 1 commit into from
May 21, 2018

Conversation

javierhonduco
Copy link
Contributor

by escaping newlines. Fixes #1037

  • Before:
$ sudo /usr/share/bcc/tools/execsnoop
PCOMM            PID    PPID   RET ARGS
awk              9910   7831     0 /usr/bin/awk
BEGIN { print "hi" }
  • With this patch:
$ sudo /usr/share/bcc/tools/execsnoop
PCOMM            PID    PPID   RET ARGS
awk              10033  7831     0 /usr/bin/awk \nBEGIN { print "hi" }

⚠️ I haven't tested this in Python2 as I haven't managed to make it work BCC with Python2 on my machine

by escaping newlines. Fixes iovisor#1037

* Before:
```
$ sudo /usr/share/bcc/tools/execsnoop
PCOMM            PID    PPID   RET ARGS
awk              9910   7831     0 /usr/bin/awk
BEGIN { print "hi" }
```

* With this patch:
```
$ sudo /usr/share/bcc/tools/execsnoop
PCOMM            PID    PPID   RET ARGS
awk              10033  7831     0 /usr/bin/awk \nBEGIN { print "hi" }
```
@yonghong-song
Copy link
Collaborator

[buildbot, ok to test]

@yonghong-song
Copy link
Collaborator

tried and python 2 also works fine.

@yonghong-song
Copy link
Collaborator

[buildbot, ok to test]

@brendangregg
Copy link
Member

thanks, makes sense to me.

@brendangregg brendangregg merged commit 492acf7 into iovisor:master May 21, 2018
@javierhonduco javierhonduco deleted the execsnoopp-argv-one-line branch May 21, 2018 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants