LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-04-2013, 03:53 PM   #1
lvlra
LQ Newbie
 
Registered: Oct 2012
Posts: 3

Rep: Reputation: Disabled
PID


What PID does a child go to when the parent dies?
 
Old 06-04-2013, 03:57 PM   #2
Adalee
LQ Newbie
 
Registered: May 2013
Posts: 9

Rep: Reputation: Disabled
I guess init, PID1.
 
Old 06-04-2013, 04:08 PM   #3
lvlra
LQ Newbie
 
Registered: Oct 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
That makes sense as it would look to its parents ancestor which is generally given a value of 1. Thank you.
 
Old 06-04-2013, 08:47 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by lvlra View Post
That makes sense as it would look to its parents ancestor which is generally given a value of 1. Thank you.
No - it always goes to 1.

the problem is that in general, shells can only wait for their own children as that is the only ones that can signal an exit. Children of children don't get reparented to the parent, as that is unknown (there is the possibility of a process group, but identifying who the group leader is is problematical since it could have exited between the time the search starts looking for it, and the time it would be found).

So processes that get abandoned when the parent exits are normally reparented to init.

http://www.informit.com/articles/art...70047&seqNum=4
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Confluence PID issue. (Removing/clearing stale PID file) vignesh4sh Linux - Server 5 12-05-2012 08:14 AM
Can I assign a Command to a specific PID so I can kill a predetermined PID johnmccarthy Linux - Newbie 1 11-03-2011 09:41 AM
kill pid.... won't work with 'pid' variable given.. sachitha Programming 6 03-06-2006 08:48 PM
/var/run/[XXX].pid - Tcl pid code liguorir Linux - Software 1 05-20-2004 11:32 PM
ERROR: Couldn't write pid to pid file lawrencegoodman Linux - Newbie 2 02-13-2004 09:05 PM


All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration