On Aug 1, 5:56 am, Andrea Di Mario wrote:
> Hi, i've created a twisted server application and i want that the
> server send me a message when someone stops or kills the process.
> I want to override reactor.stop(), but do this way send me message
> when the process is stopped by a system kill?
> C
On Aug 1, 11:39 am, Andrea Di Mario wrote:
> Thanks Thomas, it is what i'm looking for.
>
> Regards
>
> --
> Andrea Di Mario
Catch a Kill:
def signal_handler(signal, frame):
print "Received exit command."
#server.running = False
sys.exit()
signal.signal(signal.SIGINT, si
you shouldn't have anything to worry about SIGTERM if you send out a SIGCHLD
On Tue, Aug 2, 2011 at 3:44 AM, Chris Angelico wrote:
> On Tue, Aug 2, 2011 at 11:36 AM, Andrea Di Mario
> wrote:
> > If i use SIGCHLD, i will have difficult when parent receive a SIGTERM, or
> not?
>
> What you would
Am 02.08.2011 10:26 schrieb Thomas Rachel:
Am 02.08.2011 09:30 schrieb AndDM:
The function works for SIGHUP and SIGINT, but it doesn't work for
SIGTERM. I've tried with simple killall and with -15 option.
Have you some ideas?
SIGTERM cannot be caught - it kills the process the hard way.
Tha
On Tue, Aug 2, 2011 at 1:56 PM, Thomas Rachel
wrote:
> Am 02.08.2011 09:30 schrieb AndDM:
>
>> The function works for SIGHUP and SIGINT, but it doesn't work for
>> SIGTERM. I've tried with simple killall and with -15 option.
>> Have you some ideas?
>
> SIGTERM cannot be caught - it kills the proce
On Tue, Aug 2, 2011 at 11:36 AM, Andrea Di Mario wrote:
> If i use SIGCHLD, i will have difficult when parent receive a SIGTERM, or not?
What you would do is create two processes. Set up your signal
handlers, then fork; in the parent, just watch for the child's death -
in the child, do all your w
> You won't be able to catch SIGTERM, as Thomas said, but if you need to
> know what caused a process to end, the best way is to have code in the
> parent process to catch SIGCHLD. When the child ends, for any reason,
> its parent is sent SIGCHLD with some parameters, including the signal
> number
On Tue, Aug 2, 2011 at 8:30 AM, AndDM wrote:
> def receive_signal(signum, stack):
> logging.info('Received: %s' % signum)
> reactor.stop()
> signal.signal(signal.SIGTERM, receive_signal)
> signal.signal(signal.SIGHUP, receive_signal)
> sign
Am 02.08.2011 09:30 schrieb AndDM:
The function works for SIGHUP and SIGINT, but it doesn't work for
SIGTERM. I've tried with simple killall and with -15 option.
Have you some ideas?
SIGTERM cannot be caught - it kills the process the hard way.
HTH,
Thomas
--
http://mail.python.org/mailman/
On Aug 1, 5:39 pm, Andrea Di Mario wrote:
> Thanks Thomas, it is what i'm looking for.
>
> Regards
>
> --
> Andrea Di Mario
Hi, i've a little problem, here the code that i use:
def receive_signal(signum, stack):
logging.info('Received: %s' % signum)
reacto
Thanks Thomas, it is what i'm looking for.
Regards
--
Andrea Di Mario
--
http://mail.python.org/mailman/listinfo/python-list
On 01/08/11 11:56, Andrea Di Mario wrote:
> Hi, i've created a twisted server application and i want that the
> server send me a message when someone stops or kills the process.
> I want to override reactor.stop(), but do this way send me message
> when the process is stopped by a system kill?
> Co
Hi, i've created a twisted server application and i want that the
server send me a message when someone stops or kills the process.
I want to override reactor.stop(), but do this way send me message
when the process is stopped by a system kill?
Could you suggest me if there's a way to do this?
Tha
13 matches
Mail list logo