From: "ara.t.howard" Date: 2007-11-30T02:36:30+09:00 Subject: Re: SIGTERM signal is ignored by a process run using Ruby On Nov 29, 2007, at 9:17 AM, Luca Boero wrote: > Hello Everybody, > I am using Ruby 1.8.5 in a Rails 1.2.5 environment. > My code starts a dhcp-3.1.0 service taken from > http://www.isc.org/products/DHCP > Once started the dhcpd process cannot be stopped using the normal > "/etc/init.d/dhcp stop" > as it seems not to catch SIGTERM (signal 15) used within the service > script. > Can anyone help me, as it is 2 days I am unusefully fighting ? > Thank you in advance, > Luca > -- > Posted via http://www.ruby-forum.com/. > no offense - but this doesn't have anything to do with ruby does it? the dhcp script is normally a /bin/sh script and i assume yours it too? if not, and it's ruby - modify the call the 'trap' so SIGTERM is not caught. if it is /bin/sh, and SIGTERM is trapped, you will have to figure out which signal to send. Process.kill(-9, pid) will work, but i'd strive to understand *why* dhcp prefers to trap SIGTERM and determine how it is supposed to be shut down. if there is no correct way file a bug with the maintainers of that code. regards. a @ http://codeforpeople.com/ -- it is not enough to be compassionate. you must act. h.h. the 14th dalai lama