[shell-coding] Re: exception handling

From the article...

"There's one final addition to what I've just described. If the thread that 
faulted is running as a service and is for a thread-based service, the 
_except block code doesn't call ExitProcess—it calls ExitThread instead. You 
wouldn't want to terminate the entire service process just because one 
service went bad."

SO it seem like the thing to do would be to override the 
UnhandledExceptionFilter and only call ExitThread... then we could perform 
the clean up and module restart like jugg suggested. Granted, my knowledge of 
threads/process/exception handling is fuzzy at best, but that is what i 
gleamed from that article.

Any comments, corrections?

Message


In a message dated 7/27/2002 12:49:32 PM Eastern Daylight Time, 
kschaffe@xxxxxxxx writes:

> SEH is specific to Win32; so I don't think you're going to
>  be able to do it in a completely ANSI C way. You could
>  always use #defines such that the exception handler code
>  is only used when compiled under VC. Not an ideal solution
>  but at least that way it will compile under other compilers.
>  
>  Alternatively you might wanna look at the
>  SetUnhandledExceptionFilter API.

__________________________________________________
Subscription options and archive:
http://www.freelists.org/list/shell-coding

Other related posts: