Show More
@@ -48,6 +48,7 import inspect | |||
|
48 | 48 | import os |
|
49 | 49 | import random |
|
50 | 50 | import re |
|
51 | import signal | |
|
51 | 52 | import struct |
|
52 | 53 | import sys |
|
53 | 54 | import threading |
@@ -498,6 +499,11 class chgcmdserver(commandserver.server) | |||
|
498 | 499 | |
|
499 | 500 | pagercmd = _setuppagercmd(self.ui, options, cmd) |
|
500 | 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 | 507 | self.cresult.write(pagercmd) |
|
502 | 508 | else: |
|
503 | 509 | self.cresult.write('\0') |
General Comments 0
You need to be logged in to leave comments.
Login now