call a function even a program terminate abnormally
Yubin Ruan
ablacktshirt@gmail.com
Sat Aug 5 08:13:00 GMT 2017
Hi,
I am wondering whether it is possible to invoke a function when a program
terminate abnormally (e.g., segfault). I know "atexit(3)" will do the job
if the process terminate normally. But I am wondering whether that is possible
for the abnormal case. Any system call for this (on Linux)?
I am doing some interprocess communication here. If a process just die with
a lock unlocked, there might be potential deadlock.
Thanks,
Yubin
More information about the Libc-help
mailing list