[Git][NTPsec/ntpsec][master] Address GitLab issue #322: ntpwait should not terminate...

Eric S. Raymond gitlab at mg.gitlab.com
Fri Aug 11 09:13:04 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
98a287ea by Eric S. Raymond at 2017-08-11T05:12:35-04:00
Address GitLab issue #322: ntpwait should not terminate...

...with a traceback at SIGINT

- - - - -


1 changed file:

- ntpclients/ntpwait


Changes:

=====================================
ntpclients/ntpwait
=====================================
--- a/ntpclients/ntpwait
+++ b/ntpclients/ntpwait
@@ -15,9 +15,12 @@ hyphen and the flag character.
 A spurious 'not running' message can result from queries being disabled.
 """
 # SPDX-License-Identifier: BSD-2-Clause
-from __future__ import print_function, division
 
+# Because we've actually seen this fail on a ^C during import of ntp.packet.
+import signal
 import sys
+signal.signal(signal.SIGINT, lambda signal, frame: sys.exit(0))
+
 import getopt
 import re
 import time



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/98a287ea94417613ef98d98cd59d2dd35f4c1dcc

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/98a287ea94417613ef98d98cd59d2dd35f4c1dcc
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170811/d19c8b47/attachment.html>


More information about the vc mailing list