The signal handler should call only atomic functions, otherwise it will lead to
undefined behavior.
The behavior is undefined if any signal handler performs any of the following:
- call to any library function, except for plain lock-free atomic operations and
the following signal-safe functions
(note, in particular, dynamic allocation is not signal-safe)
Change-Id: I470d1d68f7870da5412fb1a2eaf1280c2845ffcf
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
}
void SignalHandler(int signo) {
- _E("SIGTERM(%d) received", signo);
RestoreSigaction();
raise(signo);
_exit(0);