Let btrace(8) execute the END probe upon receiving a SIGTERM signal
authorjca <jca@openbsd.org>
Thu, 2 Jun 2022 21:38:46 +0000 (21:38 +0000)
committerjca <jca@openbsd.org>
Thu, 2 Jun 2022 21:38:46 +0000 (21:38 +0000)
commit7ba68130937bae642c32aa655a550ad8543990f1
tree44a1d61d1cabc76b4699704992fc94ee6c95c16c
parent2c14992ee465237aa7e5d4914c4550a085a848b9
Let btrace(8) execute the END probe upon receiving a SIGTERM signal

While SIGINT (already handled) makes sense for interactive use, handling
SIGTERM in the same manner is less surprising for scripting.  This lets
you do:

  btrace ... & some workload; kill $!

and get the expected output.

ok mpi@
usr.sbin/btrace/btrace.c