libbpf-tools: fix EINTR related issues
1. Most of the tools that use perf_buffer__poll() were not handling the
case when it was interrupted by a signal, they were just ending.
We noticed this issue by running the tools inside a container, after
some seconds they will finish:
```
$ time /execsnoop
...
runc 210198 939 0 /usr/sbin/runc --version
docker-init 210205 939 0 /usr/bin/docker-init --version
Error polling perf buffer: -4
real 0m48.913s
user 0m0.020s
sys 0m0.033s
```
This commit fixes that by checking if errno is EINTR after calling
perf_buffer__poll().
2. Many tools were returning non zero when ended by SIG_INT.
```
$ sudo ./execsnoop
PCOMM PID PPID RET ARGS
runc 203967 939 0 /usr/sbin/runc --version
docker-init 203973 939 0 /usr/bin/docker-init --version
calico 203974 724 0 /opt/cni/bin/calico
portmap 203985 724 0 /opt/cni/bin/portmap
bandwidth 203990 724 0 /opt/cni/bin/bandwidth
^C
$ echo $?
130
```
3. Some tools were missing the SIG_INT handler
Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
17 files changed: