diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-09-25 20:49:22 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-09-25 20:59:09 +0200 |
commit | fa332b71dc71d23f1475ed6c25a6376934ab652a (patch) | |
tree | 1d260e1a86c56bd027ce2c6f2d74ade32ac9bb16 /source4/scripting/python | |
parent | c034ff7b1516f827ab4538613ec98daa170d9f25 (diff) | |
download | samba-fa332b71dc71d23f1475ed6c25a6376934ab652a.tar.gz samba-fa332b71dc71d23f1475ed6c25a6376934ab652a.tar.bz2 samba-fa332b71dc71d23f1475ed6c25a6376934ab652a.zip |
s4-python: Override SIGINT handler in scripts only.
Override the SIGINT handler in a few select cases only, rather than
doing so in one of the samba Python modules. I've done this where it
matters most; we can add this code to other scripts too if necessary.
This means that importing the 'samba' module from a third party
application does not have side-effects on the state of the signal
handlers.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/pyglue.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index cc312ba068..c21de46798 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -244,12 +244,5 @@ void init_glue(void) PyModule_AddObject(m, "version", PyString_FromString(SAMBA_VERSION_STRING)); - - /* one of the most annoying things about python scripts is - that they don't die when you hit control-C. This fixes that - sillyness. As we do all database operations using - transactions, this is also safe. - */ - signal(SIGINT, SIG_DFL); } |