Bug 23480 - bpfinterp.cxx should respond to ^C
Summary: bpfinterp.cxx should respond to ^C
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: bpf (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-02 16:55 UTC by Serhei Makarov
Modified: 2018-08-20 18:56 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serhei Makarov 2018-08-02 16:55:00 UTC
# stap --bpf -v -e 'probe begin { for(;;) { printf("whoosh!") } }'

Cannot be interrupted with ^C, forcing the user to kill the process.
Comment 1 Serhei Makarov 2018-08-20 18:56:59 UTC
Correction: this only happens when 'probe end { ... }' is being executed. That is because the signal handler in stapbpf.cxx sets the exit flag, which has no effect once the end probes are already running.

Fixed in commit 9d29349 by restoring signal handlers before running exit probes, and having these handlers exit immediately rather than setting exit status.