[issue480] hg serve requires page load to exit on windows

Forest Wilkinson mercurial-bugs at selenic.com
Sun Jan 14 18:20:00 CST 2007


New submission from Forest Wilkinson <h1brzs702 at sneakemail.com>:

When I run 'hg serve' on Windows, pressing ^C does not cause mercurial to exit.
 It just ignores my keystrokes until something connects to the listening socket.

I had a similar problem in some of my own code, when using python's
BaseHTTPServer.HTTPServer.serve_forever().  I worked around it by replacing this:

  server.serve_forever()

with this:

  thread = threading.Thread( target=server.serve_forever)
  thread.setDaemon( True)
  thread.start()
  while True:
    time.sleep(1)

----------
messages: 2703
nosy: forest
priority: bug
status: unread
title: hg serve requires page load to exit on windows

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue480>
____________________________________________________



More information about the Mercurial-devel mailing list