From aaa7cf67abe2d11b2a7de98964f25f17ce172705 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 4 Mar 2012 16:32:56 +0100 Subject: selftest.py: Fix signal handling. --- selftest/selftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'selftest/selftest.py') diff --git a/selftest/selftest.py b/selftest/selftest.py index 516d43c5cf..c59bcff431 100755 --- a/selftest/selftest.py +++ b/selftest/selftest.py @@ -81,7 +81,7 @@ opts, args = parser.parse_args() subunit_ops = subunithelper.SubunitOps(sys.stdout) -def pipe_handler(sig): +def pipe_handler(sig, frame): sys.stderr.write("Exiting early because of SIGPIPE.\n") sys.exit(1) @@ -276,6 +276,8 @@ if os.environ.get("SMBD_MAXTIME", ""): def has_socket_wrapper(bindir): + """Check if Samba has been built with socket wrapper support. + """ f = StringIO() subprocess.check_call([os.path.join(bindir, "smbd"), "-b"], stdout=f) for l in f.readlines(): @@ -506,7 +508,7 @@ exported_envvars = [ "LOCAL_PATH" ] -def handle_sigdie(signame): +def handle_sigdie(signame, frame): env_manager.teardown_all() sys.stderr.write("Received signal %s" % signame) sys.exit(1) -- cgit