![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
"Structured Error Handling" & linux systems
umm...what do you call "SEH" in linux? Something I can use to execute a piece of code when something goes wrong in a thread instead of crashing the whole program. Or is it like...the whole program does not crash for random thread crash in linux?
Thanks
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,206
Rep Power: 5
![]() |
SEH is a feature provided by Microsoft operating systems. There is no direct equivalent under any form of unix (including linux). The closest might be signals, which are essentially messages sent to a process. Signals can be initiated by a program, by users (eg hitting CTRL-C to terminate a program typically involves a program being sent a signal by a shell), and by the operating system (most commonly in response to an error by the program eg a "segmentation fault" is detected by the operating system, which sends an appropriate signal to the program). Programs can register signal handlers to respond to each type of signal (although there are a couple of special signals that cannot be caught by a signal handler).
The means of sending signals, and also of registering signal handlers, are operating system specific. Typically, a signal can be sent by calling a function named kill() or something similar, while a signal handler can be registered by calling a function named signal() or something similar. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Slackware installation guide for Linux beginners | coldDeath | Coder's Corner Lounge | 104 | Jul 29th, 2007 4:40 AM |
| My views on Linux | Marvin | Coder's Corner Lounge | 70 | Dec 19th, 2006 11:13 AM |
| How to meet these cross-platform project goals? | mattengland | C++ | 1 | Apr 3rd, 2006 4:01 AM |
| x86 Assembly under Linux | synthetik | Assembly | 2 | Jun 15th, 2005 3:38 AM |
| windows memset and Linux memset (difference?) | Dr.Backtick` | C++ | 0 | Feb 5th, 2005 7:59 PM |