Bluepill is not stopping child processes on restart / stop event (bug?)

Skip to first unread message

Szymon Jeż

Jan 5, 2012, 4:40:20 AM1/5/12
to Bluepill

I manage with Bluepill a process that spawns a child process. AFAIK
Bluepill is not doing anything with the child process when I send a
stop/restart event to the parent process that is managed via Bluepill
(bluepill some_app stop some_process). Therefore I had to use `pkill'
to handle the killing of the main process (killing the child makes the
parent in this case also end). Is this a design decision? I was
surprised that stopping an process lives me with a bunch of spawned
children that can live even when the parent was killed.

My current config:
app.process("some_process") do |process|
# this kills all the child processes
process.stop_command = "pkill -QUIT -P {{PID}}"

# this gets never called during stop/restart
process.monitor_children do |child_process|
child_process.stop_command = "kill -QUIT {{PID}}"

# + some more unrelated configuration

Should not there be:
@children.each do |child_process| child_process.restart_process end if
at the end of the Bluepill::Process#stop_process and
Bluepill::Process#restart_process methods?
This code AFAIR worked for me in Bluepill version 0.0.51.
Reply all
Reply to author
0 new messages