• Home
  • Interview Questions
  • Online Quiz Tests
  • Blog
  • Contact Us

Global Guideline - Interviewer and Interviewee Guide.

Links
  • Home
  • Interview Questions
  • Online Quiz Tests
  • Blog
  • Contact Us
  1. Interviews
  2. Operating System Linux
  3. Linux Signal Handling

Signal Handling Question:

Which signal is generated when we press control-C?
a) SIGINT
b) SIGTERM
c) SIGKILL
d) SIGSEGV

Linux Signal Handling Interview Question
Linux Signal Handling Interview Question

Answer:

a) SIGINT


Previous QuestionNext Question
If a signal is received by a process, when will it be processed?
a) It is processed immediately
b) It is processed when process is switching to kernel mode
c) It is processsed in the next timeslice given to the process
What is the output of the below code?

void sig_handler ( int signum) {
printf("Handled the signaln");
}

int main() {
int pid;
signal (SIGKILL, sig_handler);
pid = fork();
if (pid==0) {
kill(getppid(), SIGKILL);
exit(0);
} else {
sleep(20);
}
return 0;
}

a) Error child cannot send a SIGKILL signal to parent.
b) Parent goes to the signal handler, prints handled the signal and goes back to sleep
c) Parent goes to the signal handler, prints handled the signal and exits
d) Parent exits without going to the signal handler

Interview Categories:

    • Awk Programming
    • Linux Administrator
    • Linux Bash Arithmetic Expressions
    • Linux Commands
    • Linux Debugging
    • Linux Device Drivers
    • Linux Editors
    • Linux Environment
    • Linux GCC Compiler
    • Linux General
    • Linux IPC
    • Linux Operating System Management
    • Linux OS
    • Linux OS Systems
    • Linux Shell
    • Linux Shutdown and Startup
    • Linux Signal Handling
    • Linux Socket Programming
    • Linux Sysfs
    • Linux System Calls
    • Linux Threads
    • Makefile
    • Proc Filesystem
    • Search Pattern
    • Static and Shared Libraries

Most Popular Quiz Categories:

Java AWT And SwingHTMLSQLSAT (Scholastic Aptitude Test) Sentence CorrectionOOAD (Object Oriented Analysis and Design)Biology Aptitude TestStatistics Aptitude TestNetworkingChemistry Aptitude TestManagement

Most Popular Interviews

  • Business and Economy
  • Networking
  • Computer Programming
  • Operating System
  • Computer Hardware

Most Popular Quizzes

  • Information Technology
  • Networking
  • Engineering
  • Java
  • Accounting

Keep in touch with us

 

Copyright © 2007 - globalguideline.com

all rights reserved.
  • About Us
  • Contact Us
  • Blog
  • Terms of use
  • Privacy Policy