fix sdwdate sigterm handling during remote_times.py get_time_from_servers

Information

ID: 629
PHID: PHID-TASK-srp7d6ckduruuyel7ciq
Author: Patrick
Status at Migration Time: open
Priority at Migration Time: Normal

Description

When sdwdate is inside the threads loop in function get_time_from_servers from file remote_times.py, signal sigterm does not lead to sdwdate terminating.

signal_sigterm_handler is triggered, but sys.exit(143) is without effect.

Apparently that is to be expected.

TODO:

  • Shut terminate all eventually running threads and exit.

How to reproduce?

#!/bin/bash
set -x

cd ~/Whonix/packages/sdwdate
sudo make install
sudo -u sdwdate sdwdate &

sdwdate_pid="$!"

sleep 1

sudo kill -sigterm "$sdwdate_pid"

wait "$sdwdate_pid"
true $?

The signal must send during.

Requested urls [‘x.onion’, ‘y.onion’, ‘z.onion’]

I.e. signal must send during gevent.wait().

Comments


Patrick

2017-02-13 14:24:47 UTC


Patrick

2017-03-01 21:10:46 UTC


marmarek

2017-03-01 22:04:48 UTC


marmarek

2017-03-01 22:09:42 UTC