Mercurial > hg
view tests/test-gendoc.t @ 30891:b1b36c6499c2
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
d7875bfbfccb 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.
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 08 Feb 2017 14:45:30 -0800 |
parents | 7a1ad08b9ff5 |
children | 75be14993fda |
line wrap: on
line source
#require docutils #require gettext Test document extraction $ HGENCODING=UTF-8 $ export HGENCODING $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do > LOCALE=`basename "$PO" .po` > echo "% extracting documentation from $LOCALE" > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit > > if [ $LOCALE != C ]; then > if [ ! -f $TESTDIR/test-gendoc-$LOCALE.t ]; then > echo missing test-gendoc-$LOCALE.t > fi > cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo "** NOTHING TRANSLATED ($LOCALE) **" > fi > done; true % extracting documentation from C % extracting documentation from da % extracting documentation from de % extracting documentation from el % extracting documentation from fr % extracting documentation from it % extracting documentation from ja % extracting documentation from pt_BR % extracting documentation from ro % extracting documentation from ru % extracting documentation from sv % extracting documentation from zh_CN % extracting documentation from zh_TW