Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(cmd/tracerunner): fix signal handling in trace attach #35

Merged
merged 2 commits into from
Jan 14, 2019

Conversation

fntlnz
Copy link
Member

@fntlnz fntlnz commented Jan 14, 2019

@alban found this bug, sending a fix.

The problem is that after switching to tracerunner the tty didn't work as expected because the signals where not handled.
Signed-off-by: Lorenzo Fontana lo@linux.com

Signed-off-by: Lorenzo Fontana <lo@linux.com>
alban
alban previously approved these changes Jan 14, 2019
Copy link
Contributor

@alban alban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, but looks good otherwise.

If I understand correctly, ctrl-c on the terminal will send SIGINT to all the processes attached to the terminal: both tracerunner and bpftrace. Upon reception, tracerunner will ignore it at first and bpftrace will exit gracefully. When received a second time, tracerunner will kill bpftrace.

I wanted to test it, but I couldn't build the docker image (make image/build) because of the ARG before FROM. It seems to be moby/moby#31352. I am trying to upgrade...

pkg/cmd/tracerunner.go Outdated Show resolved Hide resolved
Signed-off-by: Lorenzo Fontana <lo@linux.com>
@fntlnz
Copy link
Member Author

fntlnz commented Jan 14, 2019

Thanks for the review @alban - merging this

@fntlnz fntlnz merged commit 889b021 into master Jan 14, 2019
@fntlnz fntlnz deleted the fix/trace-attach branch January 14, 2019 18:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants