Show More
@@ -48,6 +48,7 b' import inspect' | |||||
48 | import os |
|
48 | import os | |
49 | import random |
|
49 | import random | |
50 | import re |
|
50 | import re | |
|
51 | import signal | |||
51 | import struct |
|
52 | import struct | |
52 | import sys |
|
53 | import sys | |
53 | import threading |
|
54 | import threading | |
@@ -498,6 +499,11 b' class chgcmdserver(commandserver.server)' | |||||
498 |
|
499 | |||
499 | pagercmd = _setuppagercmd(self.ui, options, cmd) |
|
500 | pagercmd = _setuppagercmd(self.ui, options, cmd) | |
500 | if pagercmd: |
|
501 | if pagercmd: | |
|
502 | # Python's SIGPIPE is SIG_IGN by default. change to SIG_DFL so | |||
|
503 | # we can exit if the pipe to the pager is closed | |||
|
504 | if util.safehasattr(signal, 'SIGPIPE') and \ | |||
|
505 | signal.getsignal(signal.SIGPIPE) == signal.SIG_IGN: | |||
|
506 | signal.signal(signal.SIGPIPE, signal.SIG_DFL) | |||
501 | self.cresult.write(pagercmd) |
|
507 | self.cresult.write(pagercmd) | |
502 | else: |
|
508 | else: | |
503 | self.cresult.write('\0') |
|
509 | self.cresult.write('\0') |
General Comments 0
You need to be logged in to leave comments.
Login now