Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #1893
  • Loading branch information
ralsina committed Jul 17, 2015
1 parent ef87dbd commit fe2195e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,8 @@ New in master
Bugfixes
--------

Minor improvements in the extending document.
* Minor improvements in the extending document.
* Re-add the hack to kill nikola auto on ^C (Issue #1893)

New in v7.6.1
=============
Expand Down
10 changes: 6 additions & 4 deletions nikola/plugins/command/auto/__init__.py
Expand Up @@ -231,8 +231,9 @@ def __call__(self, environ, start_response):
ws.serve_forever()
except KeyboardInterrupt:
self.logger.info("Server is shutting down.")
observer.stop()
observer.join()
# This is a hack, but something is locking up in a futex
# and exit() doesn't work.
os.kill(os.getpid(), 15)
else:
# Workaround: can’t have nothing running (instant exit)
# but also can’t join threads (no way to exit)
Expand All @@ -242,8 +243,9 @@ def __call__(self, environ, start_response):
time.sleep(1)
except KeyboardInterrupt:
self.logger.info("Shutting down.")
observer.stop()
observer.join()
# This is a hack, but something is locking up in a futex
# and exit() doesn't work.
os.kill(os.getpid(), 15)

def do_rebuild(self, event):
self.logger.info('REBUILDING SITE (from {0})'.format(event.src_path))
Expand Down

0 comments on commit fe2195e

Please sign in to comment.