[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#222076: /etc/init.d/xdm: if stop from within, cannot start again



On Mon, 2003-12-01 at 13:48, Branden Robinson wrote:

> To be solved properly this would require some sort of signaling
> mechanism detacted from most of the normal process hierarchy; say, an
> "invoke-rc.dd" (daemon) with which invoke-rc.d communicated.

Couldn't you just catch the signal, and ignore it, but set yourself a
signal to die shortly if you don't already exit. Something like (I'm
sure this syntax is butchered!):

trap signal_handler -TERM

... do whatever ...

(before finishing, make sure to kill your killer)

function signal_handler {
	( sleep 3; kill -ALRM $$ ) &
}

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: