signal handling and exception handling

This is a discussion on signal handling and exception handling within the C++ Programming forums, part of the General Programming Boards category; Hi, I was wondering what is the difference between signal handling and exception handling in Linux? In what case use ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    159

    signal handling and exception handling

    Hi,
    I was wondering what is the difference between signal handling and exception handling in Linux? In what case use signal handling and which case to use exception handling?
    By signal I mean e.g. SIGXFSZ, SIGFPE. SIGSEGV...
    Thanks!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Signals are interprocess communication (although it can be used within a single process too).

    Exceptions is a C++ concept, and is normally used to indicate that something went wrong in a function, and some calling function up the stack is using try / catch to get the exception data.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by lehe View Post
    Hi,
    I was wondering what is the difference between signal handling and exception handling in Linux? In what case use signal handling and which case to use exception handling?
    By signal I mean e.g. SIGXFSZ, SIGFPE. SIGSEGV...
    Thanks!
    What do your C++ and UNIX books say?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Exception handling in a large project
    By EVOEx in forum C++ Programming
    Replies: 7
    Last Post: 01-25-2009, 07:33 AM
  2. exception handling
    By coletek in forum C++ Programming
    Replies: 2
    Last Post: 01-12-2009, 05:28 PM
  3. is such exception handling approach good?
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 12-27-2007, 08:54 AM
  4. Signal and exception handling
    By nts in forum C++ Programming
    Replies: 23
    Last Post: 11-15-2007, 02:36 PM
  5. Exception handling framework based on multiple inheritance
    By Mario F. in forum C++ Programming
    Replies: 11
    Last Post: 06-25-2007, 11:17 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21