Results 1 to 3 of 3

Thread: Signal Handling in UNIX

  1. #1
    Contributing Member
    Join Date
    May 2006
    Answers
    75

    Signal Handling in UNIX

    Hi,
    Abnormal termination of a process sends a signal to let users know about the problem. But for doing this these must be trapped. What are the functions available in UNIX or features in UNIX for doing signal trapping or handling?

    Regards,
    Blenda


  2. #2
    Contributing Member
    Join Date
    May 2006
    Answers
    82

    Re: Signal Handling in UNIX

    All signals are defined in header file <signal.h>. I have given below some of the signal functions.
    kill ( ) - A system call that send a signal to a process . kill() returns 0 for a successful call, -1 otherwise and sets errno accordingly. So return value is a integer for this call.
    raise( ) - sends the signal to the executing program
    There are lot more signal handling functions present.


  3. #3
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: Signal Handling in UNIX

    I am using this feature in my current work item. I code in C++ and there is a function library called signal.h (Unix supplied). This function library defines a lot of functions that are very handy. (I am using sigaction function).

    Here's a link to the header file definition.
    http://www.opengroup.org/onlinepubs/.../signal.h.html

    Cheers!
    Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact