The patch fixes cleanup for attach-to-process mode.
Old version behavior:
- Run some application.
- Attach heaptrack to it with heaptrack -p PID and wait for "injection finished" message.
- Break tracking with Ctrl-C.
- Result: cleanup() script function is NOT called and heaptrack_interpret process is still running.