From: Robert Klemme Date: 2012-02-02T23:17:21+09:00 Subject: Re: Starting a process and specifying its parent Victor, please do not top post. On Thu, Feb 2, 2012 at 1:06 PM, Victor Blaga wrote: > Thank you for your answer. I've further investigated the issue and you are > right. I was also calling Process.detach on the pid of the child process. > When I read the documentation I falsely understood that this method would > detach the parent process from the child process, which in my opinion ment > that once the parent process finishes the child process remains. However it > seems that it has the opposite effect. Not sure what you mean by "opposite effect" here. Process.detach only ensures that the child process does not become a zombie when it dies before this process (the parent) by automatically reaping it (see "ri Process.detach"). If the parent dies before the child anyway, you do not have to do anything because then init (PID 1) will become the parent and do the reaping. > By not calling Process.detach once the parent process closes the child > process get's assigned as parentpid = 1 (which is the master process or so > I understand). And that will reap the child. Please read this for more information: http://en.wikipedia.org/wiki/Zombie_process http://en.wikipedia.org/wiki/Daemon_%28computing%29 Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/