Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Exit() system call verses process signals Post 302989097 by bodisha on Saturday 7th of January 2017 08:30:01 PM
Old 01-07-2017
Exit() system call verses process signals

Hello and thanks in advance for any help anyone can offer me

I've been reading up on process signal calls (sighup, sigint, sigkill & sigterm) and I understand they all have different methods of terminating a running process. From what I've also read is a exit() actually terminates a process.

I'm curious to understand the process Linux goes about to terminating a process with exit() after a process signal has been issued. I've searched google but haven't seen anything that steps thru this. Could someone give me a quick & dirty explanation of this?

Much thanks!
 

10 More Discussions You Might Find Interesting

1. Programming

Problem with signals - 3 process communication

Hello, I would like to ask you for a little help with program I'm working on. I have problems with signals and synchronizing processes (I'm quite new to this part of programming). Process "parent" creates new child process "child1" and this process creates new child process "child2". The... (2 Replies)
Discussion started by: Nightwright
2 Replies

2. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 Replies

3. UNIX for Dummies Questions & Answers

UNIX System Call for creating process

Hell Sir, This is chanikya Is there any System call which behaves just like fork but i dont want to return back two times to the calling func. In the following ex iam creating a child process in the called func but the ex prints two times IN MAIN. ex :- calling() { fork(); } ... (2 Replies)
Discussion started by: chanikya
2 Replies

4. UNIX for Advanced & Expert Users

Process signals as administration

Too generic to post elsewhere, too advanced for the newbie forums. There are some applications within the unix/linux milieu that understand signals such as SIGHUP, etc as instructions to perform administrative tasks (clearing information out of this, disconnect users, etc.) I was just wondering if... (2 Replies)
Discussion started by: thmnetwork
2 Replies

5. UNIX for Advanced & Expert Users

Ignored signals & blocking system calls

If I explicity ignore a signal (for example, SIGALRM), and this signal is generated during a blocking system call (for example, a recvfrom() ), what happens to the system call? Does it abort, or does it remain blocked until its end? (2 Replies)
Discussion started by: hurricane
2 Replies

6. Shell Programming and Scripting

process and exit to new page

File1 --> into shell file for processing --> file2 I have finished the work on my shell processing script, but I need to call this from a form -->cgi-bin, have the form wait/process bar while processing occurs (5-10 seconds) and then have the shell exit gracefully while transferring to the new... (1 Reply)
Discussion started by: dba_frog
1 Replies

7. Shell Programming and Scripting

call b.sh from a.sh, and continue to a.sh after use exit 0 from b.sh

Hi, I have two sh file. a.sh and b.sh b.sh is command and used by other sh's. I want to add below line to b.sh. When it is done with b.sh I want to continue to process a.sh. But when I use exit 0 in b.sh it is exit from b.sh and a.sh How can I make it to continue to process? a.sh ... (2 Replies)
Discussion started by: ctuncer
2 Replies

8. Shell Programming and Scripting

Check the exit status in a pipe call

Guys, I have a problem :confused: and I need some help: I've to process many huge zip files. I'd code an application that receive the data from a pipe, so I can simple unzip the data and send it (via pipe) to my app. Something like that: gzip -dc <file> | app The problem is: How can I... (7 Replies)
Discussion started by: Rkolbe
7 Replies

9. UNIX for Advanced & Expert Users

Handling Signals in System Calls

What will happen if signal comes while a system call is being executed? How it will be handled? (1 Reply)
Discussion started by: rupeshkp728
1 Replies

10. Shell Programming and Scripting

Check file if not found send mail if exit call second script

I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script. I need to check the file is present ="/home/Rvtools/test.csv" if this file not found after the time retry send mail file not found If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
abort(3)						     Library Functions Manual							  abort(3)

NAME
abort - Generates a software signal to end the current process LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <stdlib.h> void abort ( void ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: abort(): ISO C, POSIX.1, XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The abort() function sends a SIGABRT signal to the current process. This signal terminates the process unless both of the following condi- tions are true: (1) signal SIGABRT is being caught, and (2) the signal handler does not do a normal return, for example, if it does a longjmp. If abort() causes the process to terminate abnormally and the current directory is writable, the system creates a core file in the current working directory. If the call to the abort() function terminates the process, each open stream and message catalog descriptor is affected as if the fclose() function was called. The abort() function then terminates the process with the same result as the _exit() function, with the exception of the status value made available to the wait() or waitpid() function. These functions receive the status value of the process terminated by the SIGABRT signal. The abort() function overrides blocking or ignoring of the SIGABRT signal. NOTES
The abort() function is supported for multi-threaded applications. RELATED INFORMATION
Functions: exit(2), kill(2), sigaction(2) Standards: standards(5) delim off abort(3)
All times are GMT -4. The time now is 12:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy