Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-28-2005, 07:05 AM   #1
Registered: Mar 2005
Posts: 61

Rep: Reputation: 15
Signal handling.........

Hi all,
Generaly we use 'signal' or 'sigaction' for signal handler registration. But is there any way to unregister the signal handler. I mean to say taht suppose I have register my handler for SIGINI. Now I want to unregister the signal handler or disable my own signal handler.

How can I do this ? Do any body has any idea ? Please help me in this regard.

Thanking u all,

With Regard,
Old 06-28-2005, 07:22 AM   #2
Registered: Jun 2005
Posts: 75

Rep: Reputation: 15
Hi rajsun,

With "signal" you can reset the handler for SIGINT to the system default with

signal(SIGINT, SIG_DFL);

With "sigaction" you can also use SIG_DFL, or you can supply the third argument to sigaction and save the previous handler and settings, to be restored later by another call to sigaction.


man 2 signal


man 2 sigaction

They should give you a lot of info on the subject.


Last edited by sind; 06-28-2005 at 07:23 AM.
Old 06-28-2005, 08:10 AM   #3
Registered: Mar 2005
Posts: 61

Original Poster
Rep: Reputation: 15
Thank u sind. Thank u very much. Actully this concept didnt strick to my mind.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Threads in signal handling shilpig Programming 3 08-20-2009 03:14 AM
Signal handling from bash shy Programming 2 11-20-2004 08:41 AM
how to detect that I'm handling signal igor.kopriva Programming 2 10-01-2004 05:46 AM
Signal Handling with LinuxThrreads TedMaul Programming 1 05-01-2004 01:56 PM
Signal handling Mohsen Programming 2 07-30-2003 06:55 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration