signals

Discussion in 'C++' started by Joe Van Dyk, Apr 4, 2006.

  1. Joe Van Dyk

    Joe Van Dyk Guest

    The C++ language doesn't deal with signals (i.e. SIGINT, SIGKILL), right?

    Joe
     
    Joe Van Dyk, Apr 4, 2006
    #1
    1. Advertising

  2. Joe Van Dyk

    Tejas Kokje Guest

    Right, signals are OS level semantics. C++ standard does not say
    anything about signals. Closest thing which I can think of is
    exceptions. But then, those are different then signals.

    However, this does not mean that you cannot use signals in C++. You can
    include <signal.h> and then use signal system call to specify signal
    handler and signal type.

    Tejas Kokje
     
    Tejas Kokje, Apr 4, 2006
    #2
    1. Advertising

  3. Joe Van Dyk

    Phlip Guest

    Tejas Kokje wrote:

    > However, this does not mean that you cannot use signals in C++. You can
    > include <signal.h> and then use signal system call to specify signal
    > handler and signal type.


    Are you POSIX-tive about that?

    ;-)

    --
    Phlip
    http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
     
    Phlip, Apr 4, 2006
    #3
  4. Joe Van Dyk

    Pete C Guest

    Joe Van Dyk wrote:
    > The C++ language doesn't deal with signals (i.e. SIGINT, SIGKILL), right?


    It does, in the standard header <csignal>. SIGINT, SIGTERM etc are
    standard macros.
    However the conditions under which these signals are delivered are not
    specified, except when you raise them yourself with the "raise"
    function.

    IIRC, Windows will never deliver these signals unless you raise them
    manually, but POSIX systems will.
     
    Pete C, Apr 4, 2006
    #4
  5. Joe Van Dyk

    Palik Imre Guest

    Joe Van Dyk <> writes:

    > The C++ language doesn't deal with signals (i.e. SIGINT, SIGKILL), right?


    Wrong.

    Section 17.3.1.2 mentions the header <csignal>, and says the following:

    Except as noted in Clauses 18 through 27, the contents of each header cname
    shall be the same as that of the corresponding header name.h, as specified
    in ISO/IEC 9899:1990 Programming Languages C (Clause 7), or ISO/IEC:1990
    Programming Languages?C AMENDMENT 1: C Integrity, (Clause 7), as
    appropriate, as if by inclusion.

    I.e., it deals with signals with the same extent as the C language.
    E.g. it says something about SIGINT, but nothing about SIGKILL.

    ImRe
     
    Palik Imre, Apr 5, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas

    unused bits in signals

    Thomas, Jul 6, 2003, in forum: VHDL
    Replies:
    2
    Views:
    1,075
    Mario Trams
    Jul 6, 2003
  2. Ingmar Seifert

    Delay of control signals

    Ingmar Seifert, Aug 18, 2003, in forum: VHDL
    Replies:
    0
    Views:
    1,204
    Ingmar Seifert
    Aug 18, 2003
  3. Simone Winkler

    generate testbench for array signals

    Simone Winkler, Aug 31, 2003, in forum: VHDL
    Replies:
    1
    Views:
    758
    Pedro Claro
    Sep 2, 2003
  4. walala
    Replies:
    3
    Views:
    749
    Allan Herriman
    Sep 9, 2003
  5. Sajan

    Dumping real signals in VCD

    Sajan, Sep 19, 2003, in forum: VHDL
    Replies:
    8
    Views:
    7,156
    vlsi.engg27
    Jul 21, 2007
Loading...

Share This Page