mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Sending signal SIGINT/SIGTERM to a running pai process causes immediate termination of that running process. This usually interrupts a select() system call waiting for more input to read from the installed events and its mapped memory buffers. As there is no signal handler installed, a SIGINT or SIGTERM signal simply terminates the process, sometimes leaving incomplete recorded output file paicryto.XXX (where XXX is the CPU number). Install a signal handler to intercept signal SIGINT or SIGTERM and run one more data collection loop to read out pending data and close all recording output files properly. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>