Skip to content

Commit

Permalink
trap HUP
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Jul 24, 2014
1 parent c05a7b2 commit 033efc2
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion disk/bitesize
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
duration=0
buckets=(1 8 64 128)
secsz=512
trap ':' INT QUIT TERM PIPE
trap ':' INT QUIT TERM PIPE HUP

function usage {
cat <<-END >&2
Expand Down
1 change: 1 addition & 0 deletions execsnoop
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ local $SIG{INT} = \&cleanup;
local $SIG{QUIT} = \&cleanup;
local $SIG{TERM} = \&cleanup;
local $SIG{PIPE} = \&cleanup;
local $SIG{HUP} = \&cleanup;
$| = 1;

### options
Expand Down
2 changes: 1 addition & 1 deletion iolatency
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ flock=/var/tmp/.ftrace-lock
bufsize_kb=4096
opt_device=0; device=; opt_iotype=0; iotype=; opt_timestamp=0
opt_interval=0; interval=1; opt_count=0; count=0; opt_queue=0
trap ':' INT QUIT TERM PIPE # sends execution to end tracing section
trap ':' INT QUIT TERM PIPE HUP # sends execution to end tracing section

function usage {
cat <<-END >&2
Expand Down
2 changes: 1 addition & 1 deletion iosnoop
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bufsize_kb=4096
opt_duration=0; duration=; opt_name=0; name=; opt_pid=0; pid=; ftext=
opt_start=0; opt_end=0; opt_device=0; device=; opt_iotype=0; iotype=
opt_queue=0
trap ':' INT QUIT TERM PIPE # sends execution to end tracing section
trap ':' INT QUIT TERM PIPE HUP # sends execution to end tracing section

function usage {
cat <<-END >&2
Expand Down
2 changes: 1 addition & 1 deletion kernel/funccount
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
tracing=/sys/kernel/debug/tracing
opt_duration=0; duration=; opt_interval=0; interval=999999; opt_timestamp=0
opt_tail=0; tcmd=cat; ttext=
trap 'quit=1' INT QUIT TERM PIPE # sends execution to end tracing section
trap 'quit=1' INT QUIT TERM PIPE HUP # sends execution to end tracing section

function usage {
cat <<-END >&2
Expand Down
2 changes: 1 addition & 1 deletion kernel/functrace
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
tracing=/sys/kernel/debug/tracing
flock=/var/tmp/.ftrace-lock
opt_duration=0; duration=; opt_pid=0; pid=; pidtext=; opt_headers=0
trap ':' INT QUIT TERM PIPE # sends execution to end tracing section
trap ':' INT QUIT TERM PIPE HUP # sends execution to end tracing section

function usage {
cat <<-END >&2
Expand Down
2 changes: 1 addition & 1 deletion kernel/kprobe
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tracing=/sys/kernel/debug/tracing
flock=/var/tmp/.ftrace-lock; wroteflock=0
opt_duration=0; duration=; opt_pid=0; pid=; opt_filter=0; filter=
opt_view=0; opt_headers=0; dmesg=2
trap ':' INT QUIT TERM PIPE # sends execution to end tracing section
trap ':' INT QUIT TERM PIPE HUP # sends execution to end tracing section

function usage {
cat <<-END >&2
Expand Down
2 changes: 1 addition & 1 deletion misc/perf-stat-hist
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

opt_buckets=0; buckets=; opt_power=0; power=4; opt_max=0; max=$((1024 * 1024))
duration=0; debug=0
trap ':' INT QUIT TERM PIPE
trap ':' INT QUIT TERM PIPE HUP

function usage {
cat <<-END >&2
Expand Down
2 changes: 1 addition & 1 deletion opensnoop
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tracing=/sys/kernel/debug/tracing
flock=/var/tmp/.ftrace-lock; wroteflock=0
opt_duration=0; duration=; opt_name=0; name=; opt_pid=0; pid=; ftext=
opt_time=0; opt_fail=0; opt_file=0; file=
trap ':' INT QUIT TERM PIPE # sends execution to end tracing section
trap ':' INT QUIT TERM PIPE HUP # sends execution to end tracing section

function usage {
cat <<-END >&2
Expand Down

0 comments on commit 033efc2

Please sign in to comment.