Signal Handling - Are they part of ANSI C?

This is a discussion on Signal Handling - Are they part of ANSI C? within the C Programming forums, part of the General Programming Boards category; Hi, Are Signal Handling part of ANSI C? I am not able to find any reference of Sig Handling in ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    4

    Signal Handling - Are they part of ANSI C?

    Hi,

    Are Signal Handling part of ANSI C?

    I am not able to find any reference of Sig Handling in Stephen Prata's "C Primer Plus".

    The usage of signals is to trap errors I guess. (It looks similiar to the concept of try-catch to me.) It seems to relate more to nix OS. Are signals handling part of Windows too?

  2. #2
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    Quote Originally Posted by Stanley S
    Hi,

    Are Signal Handling part of ANSI C?
    Yes, but an implementation need not generate the signals, except when the code calls raise().

  3. #3
    Rabble Rouser Slacker's Avatar
    Join Date
    Dec 2005
    Posts
    116
    >Are Signal Handling part of ANSI C?
    A virtually useless subset of the expected POSIX signals, yes.

    >I am not able to find any reference of Sig Handling in Stephen Prata's "C Primer Plus".
    I'm not surprised. A C primer doesn't usually give you details on the lesser used parts of the library. You probably won't see the setjmp functions either in that book. A better reference like C: A Reference Manual will give you more info.

    >It looks similiar to the concept of try-catch to me.
    Similar in concept, perhaps, but signals aren't implemented nearly as well as exceptions are. You see them used a lot in the POSIX functions, but beyond that they don't seem to be common at all.

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question about signals handling
    By smoking81 in forum Linux Programming
    Replies: 10
    Last Post: 10-01-2008, 04:38 PM
  2. Signal handling
    By Zarniwoop in forum C Programming
    Replies: 6
    Last Post: 09-13-2008, 07:04 PM
  3. is gotoxy a part of ANSI C 89 standard
    By kendals in forum C Programming
    Replies: 1
    Last Post: 03-20-2002, 07:43 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM
  5. Replies: 1
    Last Post: 11-19-2001, 04:45 PM

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