I was going through Linux Programmer's Manual about Alternative Signal Stack.
http://www.kernel.org/doc/man-pages/online/pages/man2/sigaltstack.2.html
I see that sigaltstack() is used when user's stack is corrupted or when it overflows. My problem is how to detect at run time if the stack is corrupt ?
In my running program in production, I want to go for alternate signal stack, if my program detects, stack got corrupted. Is it the right question to ask ? People in some threads talk about using debugging tools like Valgrind ( and possibly others) but unfortunately the luxury is not available in production.