init problem with Intrepid

Derek Broughton news at pointerstop.ca
Thu Oct 30 17:23:28 UTC 2008


en0f wrote:

> Cybe R. Wizard wrote:
>> en0f <en0f at bokey.mine.nu>  said:
>>> Cybe R. Wizard wrote:
>>>
>>> [ .. ]
>>>
>>>> <sudo killall gdm>  or Kdm or Xdm, depending upon what you run.
>>>> After you finish whatever you're doing, <sudo gdm>
>>> Gee! You don't kill off processes like that!
>>>
>>> You want -
>>> $ invoke-rc.d gdm stop
>>> or
>>> $ /etc/init.d/gdm stop
>>>
>>> as root.
>>>
>> Are there reasons?  I ask because it has always Worked For Me.
> 
> Yes. To allow the process to die with grace. :P)
> 
> When you killall(1) it sends SIGTERM (terminate process) by default
> (manual has more detail) which does not necessary mean files are cleaned
> up properly (save PIDs, close FHs for e.g). However, when you invoke-rc.d
> or use init.d, it'll make sure it is shut properly using
> start-stop-daemon(8) before sending the process SIGTERM.

I think you're being a little too paranoid.  You're right that it won't
clean up pid files, and other things outside the actual GDM executable, but
start-stop-daemon doesn't close its file handles - it'll just send SIGTERM
and it will close its own file handles.  The _program_ will die with just
as much grace either way, but all the other things that might be done by
the init script won't.
-- 
derek





More information about the ubuntu-users mailing list