Santosh Sahu
Santosh Sahu

Reputation: 2234

How to make the process ignore some signal(like SIGHUP,SIGABRT,SIGABORT,SIGINT etc..)

I am a newbie and have basic understanding of linux.

Whenever the kernel encounters a signal for a particular process, first it checks the signal handler table in the process control block(PCB) of the particular process. If the signal handler is registered it calls the function. if the flag is SIG_DEFAULT then it calls the signal handler registered in the global signal table of kernel. If the flag is SIG_IGNORE then kernel just ignores the signal for the particular process.

All signals have default signal handlers already registered in signal table by kernel.

I just want to know how a process can change the flag from SIG_DEFAULT TO SIG_IGNORE. Please explain the mechanism(either using system call or changes in the signal table or PCB). Next time when the signal is again captured what optimizations does the kernel do.

Upvotes: 2

Views: 2298

Answers (1)

James McNellis
James McNellis

Reputation: 354969

Call the signal function. Note that some signals may not be ultimately ignoreable.

Upvotes: 1

Related Questions