Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What does take care of a child process if a parent process is killed? (Linux 2.6)

Status
Not open for further replies.

phanikumar

Newbie level 4
Joined
Oct 27, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,333
hi

i am working in Linux 2.6 kernel. one thing i like know in linux.

if parent process is killed which is having a child process.who will take care of this child process.
 

cfant

Full Member level 3
Joined
Apr 4, 2001
Messages
188
Helped
25
Reputation
50
Reaction score
6
Trophy points
1,298
Location
California, USA
Activity points
1,151
Re: linux

Check the description for function exit and you will see that child processes are not killed automatically.
 

ivar4ever

Full Member level 3
Joined
Jun 12, 2006
Messages
189
Helped
25
Reputation
52
Reaction score
5
Trophy points
1,298
Location
India
Activity points
2,441
Re: linux

it is possible for a process to be alive even after its parent dies.
such processes are called "Zombie" processes and they will be periodically verified for by the INIT Process (the first process with PID=1) and the resources associated to them are freed after detecting them.
There is a Daemon Process that invokes this action periodically.
 

jjohn

Banned
Joined
Jun 17, 2006
Messages
158
Helped
17
Reputation
34
Reaction score
8
Trophy points
1,298
Activity points
0
linux

In Linux, every process except process 0 (the swapper) is created when another process executes the fork system call. The process that invoked fork is the parent process and the newly-created process is the child process. Every process (except process 0) has one parent process, but can have many child processes.

The kernel identifies each process by its process identifier (PID). Process 0 is a special process that is created when the system boots; after forking a child process (process 1), process 0 becomes the swapper process. Process 1, known as init, is the ancestor of every other process in the system.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top