sapling/mercurial
Jun Wu 863f8667b5 commandserver: handle backlog before exiting
Previously, when a chg server is exiting, it does not handle connected
clients so clients may get ECONNRESET and crash:

  1. client connect() # success
  2. server shouldexit = True and exit
  3. client recv() # ECONNRESET

297d89f2789e makes this race condition easier to reproduce if a lot of short
chg commands are started in parallel.

This patch fixes the above issue by unlinking the socket path to stop
queuing new connections and processing all pending connections before exit.
2017-02-08 14:45:30 -08:00
..
cffi setup: move cffi stuff to mercurial/cffi 2016-11-09 22:08:30 +00:00
default.d mergetools.rc: find OSX FileMerge in the new location inside Xcode 4.3 2015-10-16 11:37:34 +02:00
help revlog: give EXTSTORED flag value to narrowhg 2017-01-17 11:25:02 -08:00
hgweb hgweb: simplify calculation of first revision in filelog command 2017-01-17 09:19:24 +01:00
httpclient httpclient: update to 54868ef054d2 of httpplus 2016-06-27 11:53:50 -04:00
pure lazymanifest: write a more efficient, pypy friendly version of lazymanifest 2016-09-12 13:37:14 +02:00
templates hgweb: support Content Security Policy 2017-01-10 23:37:08 -08:00
__init__.py py3: refactor token parsing to handle call args properly 2016-10-14 17:55:02 +01:00
ancestor.py py3: convert to next() function 2016-05-16 21:30:53 +00:00
archival.py py3: remove use of *L syntax 2016-09-01 02:29:46 +05:30
base85.c base85: clean up function definition style 2015-11-11 19:10:45 -05:00
bdiff_module.c bdiff: early pruning of common prefix before doing expensive computations 2016-11-16 19:45:35 +01:00
bdiff.c bdiff: don't check border condition in loop 2016-11-20 16:56:21 -08:00
bdiff.h bdiff: split bdiff into cpy-aware and cpy-agnostic part 2016-07-13 10:46:26 +02:00
bitmanipulation.h internals: move the bitmanipulation routines into its own file 2016-06-06 13:08:13 +02:00
bookmarks.py py3: replace os.environ with encoding.environ (part 1 of 5) 2016-12-18 01:34:41 +05:30
branchmap.py branchmap: remove extra indent 2016-08-05 15:01:16 +02:00
bundle2.py bundle2: implement a basic __repr__ for bundle2 part 2017-02-02 14:19:48 +01:00
bundlerepo.py revlog: flag processor 2017-01-10 16:15:21 +00:00
byterange.py pycompat: switch to util.urlreq/util.urlerr for py3 compat 2016-04-06 23:22:12 +00:00
changegroup.py revlog: add 'raw' argument to revision and _addrevision 2017-01-05 17:16:07 +00:00
changelog.py changelog: keep track of file end in appender (issue5444) 2016-12-15 11:00:18 -08:00
chgserver.py chgserver: add the setprocname interface 2017-01-11 07:36:48 +08:00
cmdutil.py cmdutil: remove forwarding methods per deprecation policy 2017-02-03 16:01:19 -05:00
color.py color: load 'colortable' from extension using an 'extraloader' 2016-11-18 18:18:15 +01:00
commands.py smartset: move set classes and related functions from revset module (API) 2016-10-16 17:28:51 +09:00
commandserver.py commandserver: handle backlog before exiting 2017-02-08 14:45:30 -08:00
compat.h compat: define ssize_t as int on 32bit Windows, silences C4142 warning 2016-07-15 23:54:56 +09:00
config.py config: mark parser regexes as bytes explicitly 2016-10-09 09:25:39 -04:00
context.py context: extract _changesinrange() out of blockancestors() 2017-01-16 09:22:32 +01:00
copies.py graft: support grafting changes to new file in renamed directory (issue5436) 2016-12-05 17:40:01 +01:00
crecord.py crecord: add an experimental option for space key to move cursor down 2017-01-08 10:08:29 +08:00
dagparser.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
dagutil.py dagutil: use absolute_import 2015-08-08 19:04:09 -07:00
debugcommands.py repair: implement requirements checking for upgrades 2016-12-18 16:16:54 -08:00
demandimport.py demandimport: do not raise ImportError for unknown item in fromlist 2016-12-19 22:46:00 +09:00
destutil.py spelling: fixes of non-dictionary words 2016-10-17 23:16:55 +02:00
diffhelpers.c diffhelpers: fix botched return statement from e48d70075d8a 2015-01-28 13:34:20 -05:00
dirs.c dirs: use PyVarObject_HEAD_INIT 2016-10-13 13:14:14 +02:00
dirstate.py dirstate: fix debug.dirstate.delaywrite to use the new "now" after sleeping 2016-10-18 16:52:35 +02:00
dirstateguard.py dirstateguard: move to new module so I can break some layering violations 2016-11-21 21:29:32 -05:00
discovery.py discovery: use single quotes in use warning 2016-09-20 23:47:30 +00:00
dispatch.py py3: have a bytes version of shlex.split() 2016-12-25 03:06:55 +05:30
dummycert.pem ssl: on OS X, use a dummy cert to trick Python/OpenSSL to use system CA certs 2014-09-26 02:19:48 +02:00
encoding.py py3: make sure encoding.encoding is a bytes variable 2016-12-17 23:55:25 +05:30
error.py error: make it clear that ProgrammingError is for mercurial developers 2016-12-12 08:01:52 +00:00
exchange.py unbundle: swap conditional branches for clarity 2017-02-02 10:53:55 +01:00
exewrapper.c exewrapper: add .dll to LoadLibrary() argument 2016-04-27 09:23:39 -07:00
extensions.py py3: use pycompat.fsdecode() to pass to imp.* functions 2016-12-05 06:46:51 +05:30
fancyopts.py py3: make a bytes version of getopt.getopt() 2016-12-06 06:36:36 +05:30
filelog.py revlog: merge hash checking subfunctions 2016-12-13 14:21:36 +00:00
filemerge.py py3: replace os.environ with encoding.environ (part 3 of 5) 2016-12-18 01:54:36 +05:30
fileset.py help: clarify quotes are needed for filesets.size expressions 2016-09-21 16:33:37 +00:00
formatter.py py3: conditionalize cPickle import by adding in util 2016-06-04 14:38:00 +05:30
graphmod.py revset: add new topographical sort 2016-06-13 18:20:00 +01:00
hbisect.py hbisect: avoid shadowing a variable in a list comprehension 2016-11-10 16:33:23 -05:00
help.py help: make "mergetool" an alias for "merge-tools" 2017-01-13 21:21:02 -08:00
hg.py merge: add conflict labels to merge command 2016-10-07 08:51:50 -07:00
hook.py py3: use pycompat.getcwd() instead of os.getcwd() 2016-11-23 00:03:11 +05:30
httpconnection.py largefiles: use context for file closing 2016-10-08 00:59:41 +02:00
httppeer.py httppeer: advertise and support application/mercurial-0.2 2016-12-24 15:22:18 -07:00
i18n.py py3: replace sys.executable with pycompat.sysexecutable 2016-12-20 00:20:07 +05:30
keepalive.py keepalive: rewrite readline() 2015-10-07 16:02:45 -07:00
localrepo.py localrepo: avoid unnecessary conversion from node to rev 2017-02-02 02:56:38 -08:00
lock.py lock: clear postrelease hooks list after usage 2016-04-16 09:00:15 -07:00
lsprof.py lsprof: use print function 2016-01-02 11:40:53 -08:00
lsprofcalltree.py lsprofcalltree: use print function 2016-01-02 11:45:29 -08:00
mail.py mail: do not print(), use ui.debug() instead 2016-10-20 22:20:31 +09:00
manifest.c manifest: use PyVarObject_HEAD_INIT 2016-10-13 13:17:23 +02:00
manifest.py manifest: expose the parents() method 2016-11-17 10:59:15 -08:00
match.py i18n: translate abort messages 2016-06-14 11:53:55 +02:00
mdiff.py patch: add similarity config knob in experimental section 2017-01-09 10:51:44 -08:00
merge.py merge: more safe detection of criss cross merge conflict between dm and r 2017-02-01 02:10:30 +01:00
mergeutil.py checkunresolved: move to new package to help avoid import cycles 2016-11-21 21:31:45 -05:00
minirst.py minirst: avoid shadowing a variable in a list comprehension 2016-11-10 16:33:41 -05:00
mpatch_module.c mpatch: raise MemoryError instead of mpatchError if lalloc() failed 2016-08-07 10:06:56 +09:00
mpatch.c mpatch: raise MemoryError instead of mpatchError if lalloc() failed 2016-08-07 10:06:56 +09:00
mpatch.h mpatch: raise MemoryError instead of mpatchError if lalloc() failed 2016-08-07 10:06:56 +09:00
namespaces.py namespaces: fix name/node confusion 2016-03-16 23:12:43 +00:00
node.py dirstate: change added/modified placeholder hash length to 20 bytes 2016-11-10 02:19:16 -08:00
obsolete.py obsolete: use single quotes in use warning 2016-09-20 23:48:19 +00:00
osutil.c osutil: implement setprocname to set process title for some platforms 2016-11-11 21:11:17 +00:00
parser.py parser: extend buildargsdict() to support variable-length positional args 2017-01-09 15:25:52 +09:00
parsers.c parsers: use buffer to store revlog index 2016-12-06 11:44:49 +00:00
patch.py patch: check length of git index header only if integer is specified 2017-01-15 16:33:15 +09:00
pathencode.c pathencode: use assert() for PyBytes_Check() 2016-10-13 21:42:11 +02:00
pathutil.py py3: replace os.sep with pycompat.ossep (part 2 of 4) 2016-12-17 20:02:50 +05:30
peer.py py3: convert to next() function 2016-05-16 21:30:53 +00:00
phases.py py3: replace os.environ with encoding.environ (part 1 of 5) 2016-12-18 01:34:41 +05:30
policy.py policy: add cffi policy for PyPy 2016-06-07 15:35:58 +02:00
posix.py merge with stable 2017-01-04 14:52:59 -05:00
profiling.py py3: replace pycompat.getenv with encoding.environ.get 2017-01-15 13:17:05 +05:30
progress.py progress: obtain stderr from ui 2016-10-20 22:12:48 +09:00
pushkey.py pushkey: use absolute_import 2015-08-08 19:57:27 -07:00
pvec.py pvec: use absolute_import 2015-12-21 21:32:58 -08:00
pycompat.py py3: replace pycompat.getenv with encoding.environ.get 2017-01-15 13:17:05 +05:30
registrar.py registrar: raise a programming error on duplicated registering 2016-12-12 13:32:45 +01:00
repair.py repair: clean up stale lock file from store backup 2016-11-24 18:45:29 -08:00
repoview.py cleanup: replace uses of util.(md5|sha1|sha256|sha512) with hashlib.\1 2016-06-10 00:12:33 -04:00
revlog.py revlog: give EXTSTORED flag value to narrowhg 2017-01-17 11:25:02 -08:00
revset.py smartset: move set classes and related functions from revset module (API) 2016-10-16 17:28:51 +09:00
scmposix.py py3: replace sys.platform with pycompat.sysplatform (part 1 of 2) 2016-12-19 02:15:24 +05:30
scmutil.py py3: replace os.name with pycompat.osname (part 1 of 2) 2016-12-19 00:16:52 +05:30
scmwindows.py py3: replace os.environ with encoding.environ (part 4 of 5) 2016-12-18 02:06:00 +05:30
server.py chgserver: make it a core module and drop extension flags 2016-10-15 14:30:16 +09:00
setdiscovery.py setdiscovery: use iterbatch interface instead of batch 2016-03-01 17:44:41 -05:00
similar.py similar: remove caching from the module level 2017-01-13 11:42:36 -08:00
simplemerge.py spelling: fixes of non-dictionary words 2016-10-17 23:16:55 +02:00
smartset.py smartset: move set classes and related functions from revset module (API) 2016-10-16 17:28:51 +09:00
sshpeer.py wireproto: consolidate code for obtaining "cmds" argument value 2016-08-06 13:46:28 -07:00
sshserver.py py3: replace os.environ with encoding.environ (part 2 of 5) 2016-12-18 01:46:39 +05:30
sslutil.py py3: replace sys.executable with pycompat.sysexecutable 2016-12-20 00:20:07 +05:30
statichttprepo.py manifest: make manifestlog a storecache 2016-10-18 17:33:39 -07:00
statprof.py statprof: require input file 2017-01-18 22:45:07 -08:00
store.py store: migrate to util.iterfile 2016-11-14 23:15:01 +00:00
streamclone.py spelling: fixes of non-dictionary words 2016-10-17 23:16:55 +02:00
subrepo.py rebase: provide detailed hint to abort message if working dir is not clean 2017-01-10 09:32:27 +01:00
tagmerge.py tagmerge: use absolute_import 2015-08-08 20:10:46 -07:00
tags.py py3: convert to next() function 2016-05-16 21:30:53 +00:00
templatefilters.py pycompat: switch to util.urlreq/util.urlerr for py3 compat 2016-04-06 23:22:12 +00:00
templatekw.py templater: add '{envvars}' to access environment variables 2017-01-17 23:12:54 -05:00
templater.py py3: replace os.altsep with pycompat.altsep 2016-12-18 01:17:12 +05:30
transaction.py transaction: open a file with checkambig=True to avoid file stat ambiguity 2016-09-22 21:52:00 +09:00
treediscovery.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
ui.py ui: rename tmpdir parameter to more specific repopath 2017-01-18 18:25:51 -08:00
unionrepo.py revlog: add 'raw' argument to revision and _addrevision 2017-01-05 17:16:07 +00:00
url.py py3: replace pycompat.getenv with encoding.environ.get 2017-01-15 13:17:05 +05:30
util.h parsers: move PyInt aliasing out of util.h 2016-10-09 13:50:53 +02:00
util.py util: always force line buffered stdout when stdout is a tty (BC) 2017-02-03 15:10:27 -08:00
verify.py verify: replace _validpath() by matcher 2017-01-23 10:48:55 -08:00
win32.py py3: use pycompat.getcwd instead of os.getcwd 2016-12-22 01:54:17 +05:30
windows.py py3: replace os.environ with encoding.environ (part 3 of 5) 2016-12-18 01:54:36 +05:30
wireproto.py wireproto: advertise supported media types and compression formats 2016-12-24 15:21:46 -07:00
worker.py py3: replace os.name with pycompat.osname (part 1 of 2) 2016-12-19 00:16:52 +05:30