Mercurial > hg > mercurial-crew-with-dirclash
view tests/test-bad-pull @ 668:d93f0b127b6a
Dont trap SIGHUP on the other OS
# HG changeset patch
# User Edouard Gomez <ed.gomez@free.fr>
# Node ID 34a547cb33fe515ef4cdc8ccd173546671253ae9
# Parent 8c89408a7154d2da94766e957a088407fd0fef93
Dont trap SIGHUP on the other OS
HG doesn't work anymore on the other OS since signals are trapped.
This is due to the fact that as explained in Python docs not all
signals are defined for all platforms, so python was complaning about
missing signal.SIGHUP.
author | Edouard Gomez <ed.gomez@free.fr> |
---|---|
date | Sun, 10 Jul 2005 16:02:39 -0800 |
parents | 4fc63e22b1fe |
children | 085a8145e151 574869103985 |
line wrap: on
line source
#!/bin/sh -x hg clone http://localhost:20059/ copy echo $? ls copy cat > dumb.py <<EOF import BaseHTTPServer, SimpleHTTPServer, signal def run(server_class=BaseHTTPServer.HTTPServer, handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): server_address = ('localhost', 20059) httpd = server_class(server_address, handler_class) httpd.serve_forever() signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) run() EOF python dumb.py 2>/dev/null & sleep 2 hg clone http://localhost:20059/foo copy2 echo $? set +x kill $!