[record] handle SIGINT/SIGTERM to fclose logfile
[stat] wait termination of perfmonger-record