SlideShare a Scribd company logo
1 of 3
 Signal Concept :-
First, every signal has a name. These names all begin with the three characters SIG. For
example, SIGABRT is the abort signal that is generated when a process calls the abort function.
SIGALRM is the alarm signal that is generated when the timer set by the alarm function goes off.
Version 7 had 15 different signals; SVR4 and 4.4BSD both had 31 different signals. FreeBSD 8.0
supports 32 different signals. Mac OS X 10.6.8 and Linux 3.2.0 each support 31 different signals,
whereas Solaris 10 supports 40 different signals.
No signal has a signal number of 0. The kill function uses the signal number of 0 for a special
case. POSIX calls this value the null signal.
Numerous conditions can generate a signal:
• The terminal-generated signals occur when users press certain terminal keys. Pressing
the DELETE key on the terminal (or Control-C on many systems) normally causes the
interrupt signal (SIGINT) to be generated.
• Hardware exceptions generate signals: divide by 0, invalid memory reference, and the
like. These conditions are usually detected by the hardware, and the kernel is notified.
The kernel then generates the appropriate signal for the process that was running at
the time the condition occurred.
• The kill(2) function allows a process to send any signal to another process or process
group. Only if we must be the owner of the process that we’re sending the signal to,
or we must be the superuser.
• The kill(1) command allows us to send signals to other processes. This command is
often used to terminate a runaway background process.
• Software conditions can generate signals when a process should be notified of various
events. These aren’t hardware-generated conditions but software conditions.
Examples are SIGURG (generated when out-of-band data arrives over a network
connection), SIGPIPE (generated when a process writes to a pipe that has no reader),
and SIGALRM (generated when an alarm clock set by the process expires).
We can tell the kernel to do one of three things when a signal occurs. We call this the
disposition of the signal, or the action associated with a signal.
1. Ignore the signal. This works for most signals, but two signals can never be ignored:
SIGKILL and SIGSTOP. The reason these two signals can’t be ignored is to provide
the kernel and the superuser with a surefire way of either killing or stopping any
process. Also, if we ignore some of the signals that are generated by a hardware
exception (such as illegal memory reference or divide by 0), the behavior of the
process is undefined.
2. Catch the signal. To do this, we tell the kernel to call a function of ours whenever the
signal occurs. In our function, we can do whatever we want to handle the condition.
3. Let the default action apply. Every signal has a default action.
 signal Function :-
void (*signal(int signo, void (*func)(int)))(int);
Returns: previous disposition of signal if OK, SIG_ERR on error
The signo argument is just the name of the signal from 31 signal. The value of func is
(a) the constant SIG_IGN, (b) the constant SIG_DFL, or (c) the address of a function to be
called when the signal occurs. If we specify SIG_IGN, we are telling the system to ignore the
signal. (Remember that we cannot ignore the two signals SIGKILL and SIGSTOP.) When we
specify SIG_DFL, we are setting the action associated with the signal to its default value.
When we specify the address of a function to be called when the signal occurs, we are
arranging to ‘‘catch’’ the signal. We call the function either the signal handler or the signal-
catching function.
 kill and raise Functions :-
The kill function sends a signal to a process or a group of processes. The raise function allows
a process to send a signal to itself.
#include <signal.h>
int kill(pid_t pid, int signo);
int raise(int signo);
Both return: 0 if OK, −1 on error
The call raise(signo); is equivalent to the call kill(getpid(), signo);
There are four different conditions for the pid argument to kill.
1. pid >0 The signal is sent to the process whose process ID is pid.
2. pid ==0 The signal is sent to all processes whose process group ID equals the process
group ID of the sender and for which the sender has permission to send the signal.
3. pid <0 The signal is sent to all processes whose process group ID equals the absolute
value of pid and for which the sender has permission to send the signal.
4. pid == −1 The signal is sent to all processes on the system for which the sender has
permission to send the signal.
 alarm and pause Functions :-
The alarm function allows us to set a timer that will expire at a specified time in the
future. When the timer expires, the SIGALRM signal is generated. If we ignore or don’t catch
this signal, its default action is to terminate the process.
#include <unistd.h>
unsigned int alarm(unsigned int seconds);
Returns: 0 or number of seconds until previously set alarm
The second's value is the number of clock seconds in the future when the signal should
be generated. When that time occurs, the signal is generated by the kernel, although additional
time could elapse before the process gets control to handle the signal, because of processor
scheduling delays.
There is only one of these alarm clocks per process. If, when we call alarm, a
previously registered alarm clock for the process has not yet expired, the number of seconds
left for that alarm clock is returned as the value of this function. That previously registered
alarm clock is replaced by the new value. If a previously registered alarm clock for the process
has not yet expired and if the seconds value is 0, the previous alarm clock is canceled. The
number of seconds left for that previous alarm clock is still returned as the value of the
function.
The pause function suspends the calling process until a signal is caught
#include <unistd.h>
int pause(void);
Returns: −1 with errno set to EINTR
The only time pause returns is if a signal handler is executed and that handler returns.
 abort Function :-
We mentioned earlier that the abort function causes abnormal program termination
#include <stdlib.h>
void abort(void);
This function never returns
This function sends the SIGABRT signal to the caller.
 Sleep Function:-
#include <unistd.h>
unsigned int sleep(unsigned int seconds);
Returns: 0 or number of unslept seconds
This function causes the calling process to be suspended until either
1. The amount of wall clock time specified by seconds has elapsed.
2. A signal is caught by the process and the signal handler returns.

More Related Content

Similar to AOS Chapter 6 for internal.docx

Timers in Unix/Linux
Timers in Unix/LinuxTimers in Unix/Linux
Timers in Unix/Linuxgeeksrik
 
signals & message queues overview
signals & message queues overviewsignals & message queues overview
signals & message queues overviewVaishali Dayal
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfssusere5db05
 
Bitcoin hardware wallets security
Bitcoin hardware wallets securityBitcoin hardware wallets security
Bitcoin hardware wallets securityEric Larcheveque
 
Write a program called signal.c that performs the functions of t.docx
Write a program called signal.c that performs the functions of t.docxWrite a program called signal.c that performs the functions of t.docx
Write a program called signal.c that performs the functions of t.docxherminaprocter
 
Unit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptxUnit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptxnaveen088888
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
Automatic Door Opener using PIR Sensor
Automatic Door Opener using PIR SensorAutomatic Door Opener using PIR Sensor
Automatic Door Opener using PIR SensorRAGHUVARMA09
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandotascmandota
 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorialSalah Amean
 

Similar to AOS Chapter 6 for internal.docx (20)

Signals
SignalsSignals
Signals
 
Unix signals
Unix signalsUnix signals
Unix signals
 
Timers in Unix/Linux
Timers in Unix/LinuxTimers in Unix/Linux
Timers in Unix/Linux
 
Interrupts
InterruptsInterrupts
Interrupts
 
Process management
Process managementProcess management
Process management
 
signals & message queues overview
signals & message queues overviewsignals & message queues overview
signals & message queues overview
 
Arduino course
Arduino courseArduino course
Arduino course
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Arduino 101
Arduino 101Arduino 101
Arduino 101
 
Signal
SignalSignal
Signal
 
Bitcoin hardware wallets security
Bitcoin hardware wallets securityBitcoin hardware wallets security
Bitcoin hardware wallets security
 
Write a program called signal.c that performs the functions of t.docx
Write a program called signal.c that performs the functions of t.docxWrite a program called signal.c that performs the functions of t.docx
Write a program called signal.c that performs the functions of t.docx
 
Unit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptxUnit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptx
 
asmaa hosni
asmaa hosniasmaa hosni
asmaa hosni
 
Inter Process Comunication
Inter Process ComunicationInter Process Comunication
Inter Process Comunication
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
Automatic Door Opener using PIR Sensor
Automatic Door Opener using PIR SensorAutomatic Door Opener using PIR Sensor
Automatic Door Opener using PIR Sensor
 
Iot Workshop NITT 2015
Iot Workshop NITT 2015Iot Workshop NITT 2015
Iot Workshop NITT 2015
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandota
 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorial
 

Recently uploaded

Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxAleenaTreesaSaji
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 

Recently uploaded (20)

Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptx
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 

AOS Chapter 6 for internal.docx

  • 1.  Signal Concept :- First, every signal has a name. These names all begin with the three characters SIG. For example, SIGABRT is the abort signal that is generated when a process calls the abort function. SIGALRM is the alarm signal that is generated when the timer set by the alarm function goes off. Version 7 had 15 different signals; SVR4 and 4.4BSD both had 31 different signals. FreeBSD 8.0 supports 32 different signals. Mac OS X 10.6.8 and Linux 3.2.0 each support 31 different signals, whereas Solaris 10 supports 40 different signals. No signal has a signal number of 0. The kill function uses the signal number of 0 for a special case. POSIX calls this value the null signal. Numerous conditions can generate a signal: • The terminal-generated signals occur when users press certain terminal keys. Pressing the DELETE key on the terminal (or Control-C on many systems) normally causes the interrupt signal (SIGINT) to be generated. • Hardware exceptions generate signals: divide by 0, invalid memory reference, and the like. These conditions are usually detected by the hardware, and the kernel is notified. The kernel then generates the appropriate signal for the process that was running at the time the condition occurred. • The kill(2) function allows a process to send any signal to another process or process group. Only if we must be the owner of the process that we’re sending the signal to, or we must be the superuser. • The kill(1) command allows us to send signals to other processes. This command is often used to terminate a runaway background process. • Software conditions can generate signals when a process should be notified of various events. These aren’t hardware-generated conditions but software conditions. Examples are SIGURG (generated when out-of-band data arrives over a network connection), SIGPIPE (generated when a process writes to a pipe that has no reader), and SIGALRM (generated when an alarm clock set by the process expires). We can tell the kernel to do one of three things when a signal occurs. We call this the disposition of the signal, or the action associated with a signal. 1. Ignore the signal. This works for most signals, but two signals can never be ignored: SIGKILL and SIGSTOP. The reason these two signals can’t be ignored is to provide the kernel and the superuser with a surefire way of either killing or stopping any process. Also, if we ignore some of the signals that are generated by a hardware exception (such as illegal memory reference or divide by 0), the behavior of the process is undefined.
  • 2. 2. Catch the signal. To do this, we tell the kernel to call a function of ours whenever the signal occurs. In our function, we can do whatever we want to handle the condition. 3. Let the default action apply. Every signal has a default action.  signal Function :- void (*signal(int signo, void (*func)(int)))(int); Returns: previous disposition of signal if OK, SIG_ERR on error The signo argument is just the name of the signal from 31 signal. The value of func is (a) the constant SIG_IGN, (b) the constant SIG_DFL, or (c) the address of a function to be called when the signal occurs. If we specify SIG_IGN, we are telling the system to ignore the signal. (Remember that we cannot ignore the two signals SIGKILL and SIGSTOP.) When we specify SIG_DFL, we are setting the action associated with the signal to its default value. When we specify the address of a function to be called when the signal occurs, we are arranging to ‘‘catch’’ the signal. We call the function either the signal handler or the signal- catching function.  kill and raise Functions :- The kill function sends a signal to a process or a group of processes. The raise function allows a process to send a signal to itself. #include <signal.h> int kill(pid_t pid, int signo); int raise(int signo); Both return: 0 if OK, −1 on error The call raise(signo); is equivalent to the call kill(getpid(), signo); There are four different conditions for the pid argument to kill. 1. pid >0 The signal is sent to the process whose process ID is pid. 2. pid ==0 The signal is sent to all processes whose process group ID equals the process group ID of the sender and for which the sender has permission to send the signal. 3. pid <0 The signal is sent to all processes whose process group ID equals the absolute value of pid and for which the sender has permission to send the signal. 4. pid == −1 The signal is sent to all processes on the system for which the sender has permission to send the signal.  alarm and pause Functions :- The alarm function allows us to set a timer that will expire at a specified time in the future. When the timer expires, the SIGALRM signal is generated. If we ignore or don’t catch this signal, its default action is to terminate the process.
  • 3. #include <unistd.h> unsigned int alarm(unsigned int seconds); Returns: 0 or number of seconds until previously set alarm The second's value is the number of clock seconds in the future when the signal should be generated. When that time occurs, the signal is generated by the kernel, although additional time could elapse before the process gets control to handle the signal, because of processor scheduling delays. There is only one of these alarm clocks per process. If, when we call alarm, a previously registered alarm clock for the process has not yet expired, the number of seconds left for that alarm clock is returned as the value of this function. That previously registered alarm clock is replaced by the new value. If a previously registered alarm clock for the process has not yet expired and if the seconds value is 0, the previous alarm clock is canceled. The number of seconds left for that previous alarm clock is still returned as the value of the function. The pause function suspends the calling process until a signal is caught #include <unistd.h> int pause(void); Returns: −1 with errno set to EINTR The only time pause returns is if a signal handler is executed and that handler returns.  abort Function :- We mentioned earlier that the abort function causes abnormal program termination #include <stdlib.h> void abort(void); This function never returns This function sends the SIGABRT signal to the caller.  Sleep Function:- #include <unistd.h> unsigned int sleep(unsigned int seconds); Returns: 0 or number of unslept seconds This function causes the calling process to be suspended until either 1. The amount of wall clock time specified by seconds has elapsed. 2. A signal is caught by the process and the signal handler returns.