[Win32utils-devel] [ win32utils-Support Requests-8957 ] Killing grandchildren?

noreply at rubyforge.org noreply at rubyforge.org
Wed Feb 28 20:36:18 EST 2007

Support Requests item #8957, was opened at 2007-02-28 13:47
You can respond by visiting: 

Category: win32-process
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Chad Woolley (thewoolleyman)
Assigned to: Nobody (None)
Summary: Killing grandchildren?

Initial Comment:
I am trying to spawn, then kill, a gem_server process.  On windows, however, this actually spawns a child cmd instance for the gem_installer.bat file, which then spawns a grandchild ruby process for the gem_server command.

I can't figure out how to make the grandchild process die.  If I could get it's PID, I could kill it, but I only have the pid of the child process.  If I kill the child, then the grandchild is not killed, but stays alive, and is owned by the top-level cmd shell process.

Here's the file where I am trying to do this:




>Comment By: Daniel Berger (djberg96)
Date: 2007-02-28 18:36

There's just no way to do that as far as I know, because of the way the Windows process model works, i.e. Processes know about their children but not their grandchildren.

However, since it appears that you're trying to daemonize a gem_server, I recommed using the ruby-services package. It has services for gems, webrick and fastri. Install the gem service, and control it that way instead. It's what I do.




You can respond by visiting: 

More information about the win32utils-devel mailing list