Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

exit(2) [minix man page]

EXIT(2) 							System Calls Manual							   EXIT(2)

NAME
exit, _exit - terminate a process SYNOPSIS
void _exit(int status) DESCRIPTION
_exit terminates a process with the following consequences: All of the descriptors open in the calling process are closed. This may entail delays, for example, waiting for output to drain; a process in this state may not be killed, as it is already dying. If the parent process of the calling process is executing a wait or is interested in the SIGCHLD signal (Minix-vmd), then it is notified of the calling process's termination and the low-order eight bits of status are made available to it; see wait(2). The parent process ID of all of the calling process's existing child processes are also set to 1. This means that the initializa- tion process (see intro(2)) inherits each of these processes as well. Most C programs call the library routine exit(3), which performs cleanup actions in the standard I/O library before calling _exit. RETURN VALUE
This call never returns. SEE ALSO
fork(2), sigaction(2), wait(2), exit(3). 4th Berkeley Distribution May 22, 1986 EXIT(2)

Check Out this Related Man Page

EXIT(2) 							System Calls Manual							   EXIT(2)

NAME
_exit - terminate a process SYNOPSIS
_exit(status) int status; DESCRIPTION
_exit terminates a process with the following consequences: All of the descriptors open in the calling process are closed. This may entail delays, for example, waiting for output to drain; a process in this state may not be killed, as it is already dying. If the parent process of the calling process is executing a wait or is interested in the SIGCHLD signal, then it is notified of the calling process's termination and the low-order eight bits of status are made available to it; see wait(2). The parent process ID of all of the calling process's existing child processes are also set to 1. This means that the initialization process (see intro(2)) inherits each of these processes as well. Any stopped children are restarted with a hangup signal (SIGHUP). Most C programs call the library routine exit(3), which performs cleanup actions in the standard I/O library before calling _exit. RETURN VALUE
This call never returns. SEE ALSO
fork(2), sigvec(2), wait(2), exit(3) 4th Berkeley Distribution May 22, 1986 EXIT(2)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

process

how do differentiate a parent process and child process through the process id while it is executing through fork() command. can i get the process id of both processes and can i do any operation on the process by using process id (6 Replies)
Discussion started by: MKSRaja
6 Replies

2. UNIX for Advanced & Expert Users

catch SIGCHLD signal in parent process

I want to catch SIGCHLD signal in parent process. I can't use wait() system call to catch SIGCHLD according to project requirment. Operating system linux 3.1 can any one have a solution for this. Thanking you, ranjan (2 Replies)
Discussion started by: ranjan
2 Replies

3. Shell Programming and Scripting

how to find the chid process id from given parent process id

how to find the chid process id from given parent process id.... (the chid process doesnot have sub processes inturn) (3 Replies)
Discussion started by: guhas
3 Replies

4. Linux

waiting process

how to know the information of the waiting process how to calculate the time of the process that it has taken to execute i want to make a program that Should be able to keep a log of the processes expired(The log should contain the starting time, expiry time, time slices used, total execution... (2 Replies)
Discussion started by: shukla_chanchal
2 Replies

5. Solaris

Trouble In Process

Hi, Actually I am working in perl. I need to write a script when a script is running If the parent process is killed child process should be killed automatically.So I need some Information On process. I need to know when we press ctrl+c to stop code execution where Parent is killed or child is... (1 Reply)
Discussion started by: Santdash
1 Replies

6. Programming

parent not waiting until child complete executing another program through execl()

Hi, I am calling a program that greps and returns 72536 bytes of data on STDOUT, say about 7000 lines of data on STDOUT. I use pipe from the program am calling the above program. Naturally, I execute the above program (through execl() ) throught the child process and try to read the... (4 Replies)
Discussion started by: vvaidyan
4 Replies

7. UNIX for Advanced & Expert Users

removing hang processes (AIX)

Hi Guys, Just wondering if I have a child process which is basically hanging and I can see that is on sleep or wait mode if I want to remove/terminate this process , the signal has to come from its parent I assume. The reason I'm asking this is because I'm facing a db2 hang situation and we... (3 Replies)
Discussion started by: hariza
3 Replies

8. UNIX for Dummies Questions & Answers

"_exit(-1)" command gives core dump ..

Hi, I am getting fatal error or core dump by using this command "_exit(-1)". I need to terminate the program at a certain condition, but continous calling of this exit function, I am getting core dump. Is there any other command can be used to avoid the core dump ?? (3 Replies)
Discussion started by: ronix007
3 Replies

9. UNIX for Advanced & Expert Users

Forking a new process without parent dependance

hi, I want my program to fork a new process and then I want to kill the parent process. The parent program before dying will issue a SIGTERM to all its childs. Which eventually kills all Children. I cant handle the SIGTERM at the child level.:( What I was thinking of was the Parent... (3 Replies)
Discussion started by: tyler_durden
3 Replies

10. Programming

process status

hello everybody!! i want to post a question! is there any way to get process status using C commands? To be more specific, i want to know whether a process is running or is stop or killed. thanks in advance! (3 Replies)
Discussion started by: nicos
3 Replies

11. UNIX for Advanced & Expert Users

wait process

can any one please give me clear idea of wait process in UNIX system. I am using AIX 5.3 and see loots of wait process. I have very basic concept of wait process. If CPU has nothing to do then a wait process is generated per CPU. But i want know the detail how is it forked. Is wait a jombe... (2 Replies)
Discussion started by: pchangba1
2 Replies

12. Programming

difference between exit() and _exit()

By using exit() and _exit() we can terminate a program. What is the:confused: difference between these two ??? (4 Replies)
Discussion started by: lipun4u
4 Replies

13. Windows & DOS: Issues & Discussions

Kill a process

Hi, How can I terminate process using vbscript. PLEASE NOTE, I need to terminate process that runs under windows 64-bit environment as native 64 (not using select * from win_32_Process) (3 Replies)
Discussion started by: cratercrabs
3 Replies

14. HP-UX

Long process hpux

Hi, I Have HPUXB.11.23 I need a command, for find the process with more 12 hours executing Thanks Guido (2 Replies)
Discussion started by: Guidocl
2 Replies

15. What is on Your Mind?

Are the BSDs dying?

Source a quick google search making clear that this isn't really new, and if we look at our bsd Forum we see that its the only operation systems forum with the last comment dated to June last year, whereas all the others have more recent comments. One comment dated to 2014 is exactly what I... (10 Replies)
Discussion started by: dodona
10 Replies