public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* call a function even a program terminate abnormally
@ 2017-08-05  8:13 Yubin Ruan
  2017-08-05  9:29 ` Patrick Schlangen
  0 siblings, 1 reply; 4+ messages in thread
From: Yubin Ruan @ 2017-08-05  8:13 UTC (permalink / raw)
  To: libc-help

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-05  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-05  8:13 call a function even a program terminate abnormally Yubin Ruan
2017-08-05  9:29 ` Patrick Schlangen
2017-08-05  9:31   ` Marcin Mielniczuk
2017-08-05  9:47     ` Patrick Schlangen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).