help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: have emacs use SIGTERM to end a process instead of SIGHUP


From: John Leach
Subject: Re: have emacs use SIGTERM to end a process instead of SIGHUP
Date: Fri, 12 Jul 2013 12:01:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

On 09/07/13 13:02, Tassilo Horn wrote:
> John Leach <john@johnleach.co.uk> writes:
> 
> Hi John,
> 
>> I'm starting a process using start-process-shell-command, but the
>> command I'm running doesn't exit when it receives a SIGHUP (it reloads
>> it's configs or something) so I end up with orphaned processes hanging
>> around when I close the buffer or exit emacs.
> 
> I guess you could add a function to `kill-buffer-hook' that calls
> `delete-process' on the process.

thanks Tassilo. I'm trying to do this but failing.

So I think I need a kill-buffer-hook that can get the process of the
current buffer, check if it looks like the process I know needs a
SIGTERM, and then send it one.

I'm wondering if I can set some kind of attribute on the buffer when I
create the process, so I can easily recognise it at kill time? Rather
than looking at the command line or something.

I'm lost with even the basic syntax to do any of this though. Could you
help?

Thanks,

John.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]