ntpq crashes if stdout pipe closed

Hal Murray hmurray at megapathdsl.net
Mon Nov 21 23:56:44 UTC 2016


[murray at glypnod play]$ ntpq -p | head -3
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
-shuksan         .PPS.            1 u   15   64    1    0.106    0.017   0.002
Traceback (most recent call last):
  File "/usr/local/bin/ntpq", line 1590, in <module>
    interpreter.onecmd(cmd)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/usr/local/bin/ntpq", line 1123, in do_peers
    self.__dopeers(showall=False, mode="peers")
  File "/usr/local/bin/ntpq", line 334, in __dopeers
    variables, peer.associd))
  File "/usr/local/bin/ntpq", line 173, in say
    sys.stdout.flush()  # In case we're piping the output
IOError: [Errno 32] Broken pipe
[murray at glypnod play]$ 


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list