]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
14 years agoStabilization of the period of ioloop.PeriodicCallback. 320/head
Jesus Arias Fisteus [Thu, 28 Jul 2011 16:44:29 +0000 (18:44 +0200)] 
Stabilization of the period of ioloop.PeriodicCallback.

Previously, the timeout for the following event was computed by adding
callback_time to the actual time the callback finished, which caused
calls to the callback not being trully periodic.

This commit makes callback_time be a stable period by scheduling the
next timeout callback_time after the previous timeout was scheduled.

14 years agoAdd option to print out generated template code in benchmark
Ben Darnell [Thu, 28 Jul 2011 05:09:49 +0000 (22:09 -0700)] 
Add option to print out generated template code in benchmark

14 years agoSpeed up xhtml_escape (template benchmark goes from 49ms to 32ms)
Ben Darnell [Thu, 28 Jul 2011 05:03:50 +0000 (22:03 -0700)] 
Speed up xhtml_escape (template benchmark goes from 49ms to 32ms)

14 years agoAdd a template benchmark, based on one in jinja2
Ben Darnell [Thu, 28 Jul 2011 05:01:05 +0000 (22:01 -0700)] 
Add a template benchmark, based on one in jinja2

14 years agoMore defensiveness about patterns that could lead to double callbacks.
Ben Darnell [Thu, 28 Jul 2011 04:04:22 +0000 (21:04 -0700)] 
More defensiveness about patterns that could lead to double callbacks.

14 years agoAllow unicode string literals to appear in template expressions.
Ben Darnell [Tue, 26 Jul 2011 17:50:32 +0000 (10:50 -0700)] 
Allow unicode string literals to appear in template expressions.

Closes #313.

14 years agoSupport Content-Length headers that have been duplicated by a proxy.
Ben Darnell [Mon, 25 Jul 2011 02:59:14 +0000 (19:59 -0700)] 
Support Content-Length headers that have been duplicated by a proxy.

Closes #249.

14 years agoMerge branch 'httpclient_buffer'
Ben Darnell [Mon, 25 Jul 2011 02:24:23 +0000 (19:24 -0700)] 
Merge branch 'httpclient_buffer'

14 years agoFix test that depended on simple_httpclient implementation detail.
Ben Darnell [Mon, 25 Jul 2011 02:23:38 +0000 (19:23 -0700)] 
Fix test that depended on simple_httpclient implementation detail.

14 years agoAllow setting the maximum read buffer size when constructing a SimpleAsyncHTTPClient... 310/head
David Recordon [Thu, 21 Jul 2011 04:23:01 +0000 (21:23 -0700)] 
Allow setting the maximum read buffer size when constructing a SimpleAsyncHTTPClient. Defaults to 100mb like the underlying IOStream. Tested that fetching a file over 100mb no longer gives a "Maximum read buffer size" exception.

14 years agoConsistently guard against uncaught exceptions leading to multiple callback
Ben Darnell [Wed, 20 Jul 2011 02:35:22 +0000 (19:35 -0700)] 
Consistently guard against uncaught exceptions leading to multiple callback
invocations in SimpleAsyncHTTPClient.

14 years agoNoticed that a max_clients around 50 would cause us to run out of file descriptors... 309/head
David Recordon [Wed, 20 Jul 2011 02:12:28 +0000 (19:12 -0700)] 
Noticed that a max_clients around 50 would cause us to run out of file descriptors. lsof showed that TCP connections would remain in the established state versus being closed. stream.close is called in error states but not success. Thus call stream.close after passing the response to the callback. Result was seeing the TCP connections being properly closed as well as no change in fetching data.

14 years agoDelay IOStream close callback until all pending callbacks have been processed.
Ben Darnell [Tue, 19 Jul 2011 06:52:27 +0000 (23:52 -0700)] 
Delay IOStream close callback until all pending callbacks have been processed.

This fixes an issue with SimpleAsyncHTTPClient when the server closes the
connection and the close is processed before all of the data is read.

Closes #306.

14 years agoMove httpclient_tests that never worked with curl to simple_httpclient_test.
Ben Darnell [Tue, 19 Jul 2011 05:59:01 +0000 (22:59 -0700)] 
Move httpclient_tests that never worked with curl to simple_httpclient_test.

curl_httpclient_test was previously creating SimpleAsyncHTTPClients due to a
bug, so these failing tests went unnoticed.

14 years agoFix HTTP client selection as used in curl_httpclient_test.
Ben Darnell [Tue, 19 Jul 2011 05:34:19 +0000 (22:34 -0700)] 
Fix HTTP client selection as used in curl_httpclient_test.

AsyncHTTPClient.configure() was working, but it didn't work to instantiate
the client directly like the unit tests were using.

14 years agoMake "python -m tornado.autoreload" run with a consistent sys.path.
Ben Darnell [Tue, 19 Jul 2011 04:25:59 +0000 (21:25 -0700)] 
Make "python -m tornado.autoreload" run with a consistent sys.path.

14 years agoAdd a config file to run tornado tests under multiple python versions with tox.
Ben Darnell [Sun, 17 Jul 2011 23:52:56 +0000 (16:52 -0700)] 
Add a config file to run tornado tests under multiple python versions with tox.

Also fix a setup.py problem that was leaving files out of the sdist output.

14 years agoMerge branch 'master' into twisted
Ben Darnell [Sun, 17 Jul 2011 22:18:49 +0000 (15:18 -0700)] 
Merge branch 'master' into twisted

14 years agoChange binary literals to hex for compatibility with python2.5
Ben Darnell [Sun, 17 Jul 2011 22:17:36 +0000 (15:17 -0700)] 
Change binary literals to hex for compatibility with python2.5

14 years agoFix WebSocketProtocol8 on python3
Ben Darnell [Sun, 17 Jul 2011 22:13:04 +0000 (15:13 -0700)] 
Fix WebSocketProtocol8 on python3

14 years agoMake websocket demo work on firefox 6 beta
Ben Darnell [Sun, 17 Jul 2011 22:01:07 +0000 (15:01 -0700)] 
Make websocket demo work on firefox 6 beta

14 years agoMerge remote-tracking branch 'flodiebold/master' into merge-websocket
Ben Darnell [Sun, 17 Jul 2011 22:00:52 +0000 (15:00 -0700)] 
Merge remote-tracking branch 'flodiebold/master' into merge-websocket

14 years agoRename twistedreactor -> twisted
Ben Darnell [Sun, 17 Jul 2011 21:07:19 +0000 (14:07 -0700)] 
Rename twistedreactor -> twisted

14 years agoRun parts of twisted's test suite on the tornado reactor
Ben Darnell [Sun, 17 Jul 2011 21:03:42 +0000 (14:03 -0700)] 
Run parts of twisted's test suite on the tornado reactor

14 years agoHandle the hybi-07 version of the WebSocket protocol with the 08 implementation.
Florian Diebold [Sun, 17 Jul 2011 20:15:21 +0000 (22:15 +0200)] 
Handle the hybi-07 version of the WebSocket protocol with the 08 implementation.

There don't seem to be any differences on the server side.

14 years agoMake twisted tests run under python 2.5
Ben Darnell [Sun, 17 Jul 2011 19:46:22 +0000 (12:46 -0700)] 
Make twisted tests run under python 2.5

14 years agoSend the data of the ping frame back in the pong, as specified.
Florian Diebold [Sun, 17 Jul 2011 19:25:05 +0000 (21:25 +0200)] 
Send the data of the ping frame back in the pong, as specified.

14 years agoFix an exception when connecting with an unsupported WebSocket version.
Florian Diebold [Sun, 17 Jul 2011 19:16:30 +0000 (21:16 +0200)] 
Fix an exception when connecting with an unsupported WebSocket version.

14 years agoRemove new backwards-incompatible arguments from StaticFileHandler.set_extra_headers
Ben Darnell [Sun, 17 Jul 2011 17:25:53 +0000 (10:25 -0700)] 
Remove new backwards-incompatible arguments from StaticFileHandler.set_extra_headers

14 years agoMerge commit '8dbe9ba' into work
Ben Darnell [Sun, 17 Jul 2011 17:45:54 +0000 (10:45 -0700)] 
Merge commit '8dbe9ba' into work

14 years agoRemoved run() method. 302/head
Ovidiu Predescu [Fri, 15 Jul 2011 02:00:44 +0000 (19:00 -0700)] 
Removed run() method.

14 years agoNew test to check that addWriter followed by removeWriter properly removes the writer...
Ovidiu Predescu [Thu, 14 Jul 2011 23:24:42 +0000 (16:24 -0700)] 
New test to check that addWriter followed by removeWriter properly removes the writer from IOLoop.

14 years agoMoved twisted/reactor.py to platform/twistedreactor.py.
Ovidiu Predescu [Thu, 14 Jul 2011 23:00:02 +0000 (16:00 -0700)] 
Moved twisted/reactor.py to platform/twistedreactor.py.

twistedreactor.py:
  - cleaned up logging
  - don't try to crash if stop has been called (uses _running to check it)
  - don't add reader and writers if they've already been added
  - use a NullContext when calling add_handler
  - call IOLoop.close() to properly close file descriptors
  - implement run() and instruct the reactor to not install signal handlers.

import_test.py:
  - import twistedreactor too

twistedreactor_test.py:
  - do conditional includes based on twisted
  - remove superfluous logging
  - don't use assertGreater
  - use threading instead of the thread module. Join threads at the end of test.
  - properly close the file descriptor in Reader/Writer's connectionLost().
  - make use of tornado.platform.auto's set_close_exec.
  - write only one in the pipe, and check for that.

14 years agoFix misspelling.
Ovidiu Predescu [Thu, 14 Jul 2011 22:52:35 +0000 (15:52 -0700)] 
Fix misspelling.

14 years agoAdd a callback for flow control to RequestHandler.flush
Ben Darnell [Thu, 14 Jul 2011 03:09:02 +0000 (20:09 -0700)] 
Add a callback for flow control to RequestHandler.flush

14 years agoImplement the hybi-10 version of the WebSocket protocol.
Florian Diebold [Wed, 13 Jul 2011 19:12:48 +0000 (21:12 +0200)] 
Implement the hybi-10 version of the WebSocket protocol.

14 years agoRefactor WebSocket support to prepare for multiple protocol versions.
Florian Diebold [Sat, 9 Jul 2011 20:33:21 +0000 (22:33 +0200)] 
Refactor WebSocket support to prepare for multiple protocol versions.

All protocol-specific functions are moved to the former
WebSocketRequest class, which is renamed to WebSocketProtocol76. The
WebSocketHandler chooses the right WebSocketProtocol implementation by
looking at the request headers.

14 years agoEnabled subclasses to specify expiration time.
Krzysztof Tarnowski [Wed, 13 Jul 2011 17:56:24 +0000 (19:56 +0200)] 
Enabled subclasses to specify expiration time.

14 years agoDon't use defaults in reactor.py as they cause unneeded initializations.
Ovidiu Predescu [Tue, 12 Jul 2011 20:32:59 +0000 (13:32 -0700)] 
Don't use defaults in reactor.py as they cause unneeded initializations.

Fix the unittest to not initialize IOLoop's global instance.

14 years agoAdded the twistedreactor_test to runtests.py.
Ovidiu Predescu [Tue, 12 Jul 2011 19:08:50 +0000 (12:08 -0700)] 
Added the twistedreactor_test to runtests.py.

14 years agoAdded author and copyright info.
Ovidiu Predescu [Tue, 12 Jul 2011 19:04:26 +0000 (12:04 -0700)] 
Added author and copyright info.

14 years agoUpdated to not depend on IOLoop's _set_nonblocking and _set_close_exec, which were...
Ovidiu Predescu [Tue, 12 Jul 2011 18:39:21 +0000 (11:39 -0700)] 
Updated to not depend on IOLoop's _set_nonblocking and _set_close_exec, which were moved to a separate file.

14 years agoAdded twisted-style reactor for Tornado.
Ovidiu Predescu [Tue, 12 Jul 2011 18:28:24 +0000 (11:28 -0700)] 
Added twisted-style reactor for Tornado.

14 years agoFix race condition in cross-thread IOLoop.add_callback
Ben Darnell [Tue, 12 Jul 2011 17:26:33 +0000 (10:26 -0700)] 
Fix race condition in cross-thread IOLoop.add_callback

14 years agoBetter error message
Ben Darnell [Tue, 12 Jul 2011 16:14:16 +0000 (09:14 -0700)] 
Better error message

14 years agoDoc and release note updates.
Ben Darnell [Mon, 11 Jul 2011 00:13:00 +0000 (17:13 -0700)] 
Doc and release note updates.

14 years agoSupport multi-line headers
Ben Darnell [Sun, 10 Jul 2011 23:13:45 +0000 (16:13 -0700)] 
Support multi-line headers

Closes #9.

14 years agoProperly quote and unquote cookie values.
Ben Darnell [Sun, 10 Jul 2011 22:30:52 +0000 (15:30 -0700)] 
Properly quote and unquote cookie values.

Closes #36.

14 years agoFix parsing of uploaded filenames with special characters.
Ben Darnell [Sun, 10 Jul 2011 21:00:09 +0000 (14:00 -0700)] 
Fix parsing of uploaded filenames with special characters.

Closes #24.

14 years agoAllow any properly-formatted locale, not just ones in LOCALE_NAMES.
Ben Darnell [Sun, 10 Jul 2011 19:11:43 +0000 (12:11 -0700)] 
Allow any properly-formatted locale, not just ones in LOCALE_NAMES.

14 years agoRe-enable default_certificates test
Ben Darnell [Sun, 10 Jul 2011 00:39:55 +0000 (17:39 -0700)] 
Re-enable default_certificates test

14 years agoallow_nonstandard_methods now also skips the check that only POST and
Ben Darnell [Sun, 10 Jul 2011 00:20:29 +0000 (17:20 -0700)] 
allow_nonstandard_methods now also skips the check that only POST and
PUT requests have bodies

14 years agoMove socket accept loop from HTTPServer to netutil.
Ben Darnell [Sat, 9 Jul 2011 21:35:59 +0000 (14:35 -0700)] 
Move socket accept loop from HTTPServer to netutil.

14 years agoAdd a way of customizing cache control behavior for static files.
Krzysztof Tarnowski [Fri, 8 Jul 2011 11:40:11 +0000 (13:40 +0200)] 
Add a way of customizing cache control behavior for static files.

14 years agoAdd basic unix socket support.
Ben Darnell [Fri, 8 Jul 2011 05:14:36 +0000 (22:14 -0700)] 
Add basic unix socket support.

tornado.netutil.bind_unix_socket can create non-blocking listening unix
sockets, and HTTPServer can use them.  (no client-side support for this yet)
This is useful e.g. with nginx proxying incoming TCP traffic to
a backend over a unix socket (which may be easier to manage than a set of
TCP ports)

14 years agoSpeed up Application.__call__ when there are no matched groups
Ben Darnell [Wed, 6 Jul 2011 16:56:46 +0000 (09:56 -0700)] 
Speed up Application.__call__ when there are no matched groups

14 years agoBetter benchmark script
Ben Darnell [Wed, 6 Jul 2011 17:00:17 +0000 (10:00 -0700)] 
Better benchmark script

14 years agoMerge pull request #297 from funtoo/patch-1
bdarnell [Thu, 7 Jul 2011 00:00:28 +0000 (17:00 -0700)] 
Merge pull request #297 from funtoo/patch-1

Install platform files too.

14 years agoInstall platform files too. 297/head
Daniel Robbins [Wed, 6 Jul 2011 22:00:11 +0000 (15:00 -0700)] 
Install platform files too.

14 years agoDon't keep the entire output in a cStringIO when gzipping chunks
Ben Darnell [Wed, 6 Jul 2011 06:53:38 +0000 (23:53 -0700)] 
Don't keep the entire output in a cStringIO when gzipping chunks

14 years agoDocument IOStream fast-path/slow-path, and allow for chains of fast-path ops.
Ben Darnell [Wed, 6 Jul 2011 05:51:37 +0000 (22:51 -0700)] 
Document IOStream fast-path/slow-path, and allow for chains of fast-path ops.

14 years agoAdd a fast path for IOStream writes in addition to reads.
Ben Darnell [Wed, 6 Jul 2011 05:34:26 +0000 (22:34 -0700)] 
Add a fast path for IOStream writes in addition to reads.

This is a significant speedup for small requests, since it is now
possible to do a request and (synchronous) response without calling
IOLoop.add_handler.

14 years agoDon't add an event handler for IOStream until we've done a read or write.
Ben Darnell [Wed, 6 Jul 2011 05:31:24 +0000 (22:31 -0700)] 
Don't add an event handler for IOStream until we've done a read or write.

This speeds things up a bit by avoiding a system call to add a handler
for errors that is just replaced by the first read or write.

14 years agoMake this test more robust against the timing of server exits.
Ben Darnell [Wed, 6 Jul 2011 04:53:08 +0000 (21:53 -0700)] 
Make this test more robust against the timing of server exits.

14 years agoUse lists of tuples instead of dicts since this test cares about order
Ben Darnell [Tue, 5 Jul 2011 07:12:30 +0000 (00:12 -0700)] 
Use lists of tuples instead of dicts since this test cares about order

14 years agoNon-file-based template loaders should always use posix filename semantics
Ben Darnell [Tue, 5 Jul 2011 05:34:13 +0000 (22:34 -0700)] 
Non-file-based template loaders should always use posix filename semantics

14 years agoDisable this test on non-unix platforms
Ben Darnell [Tue, 5 Jul 2011 05:26:39 +0000 (22:26 -0700)] 
Disable this test on non-unix platforms

14 years agoMove the waker pipe into tornado.platform.
Ben Darnell [Tue, 5 Jul 2011 04:04:53 +0000 (21:04 -0700)] 
Move the waker pipe into tornado.platform.

14 years agoClean up hacky fcntl emulation for windows.
Ben Darnell [Tue, 5 Jul 2011 03:37:52 +0000 (20:37 -0700)] 
Clean up hacky fcntl emulation for windows.

14 years agoThis looks like it's always been backwards.
Ben Darnell [Tue, 5 Jul 2011 03:33:21 +0000 (20:33 -0700)] 
This looks like it's always been backwards.

14 years agoMove win32_support to a new tornado.platform package
Ben Darnell [Tue, 5 Jul 2011 03:20:26 +0000 (20:20 -0700)] 
Move win32_support to a new tornado.platform package

14 years agoRelease notes for multi-process stuff
Ben Darnell [Tue, 5 Jul 2011 02:24:20 +0000 (19:24 -0700)] 
Release notes for multi-process stuff

14 years agoCheck for forked status in autoreload
Ben Darnell [Tue, 5 Jul 2011 02:15:37 +0000 (19:15 -0700)] 
Check for forked status in autoreload

14 years agoBetter fork_processes: Restart processes when they exit abnormally. Tests!
Ben Darnell [Tue, 5 Jul 2011 02:11:32 +0000 (19:11 -0700)] 
Better fork_processes:  Restart processes when they exit abnormally.  Tests!

14 years agoDon't initialize the singleton IOLoop from tearDown
Ben Darnell [Tue, 5 Jul 2011 01:12:15 +0000 (18:12 -0700)] 
Don't initialize the singleton IOLoop from tearDown

14 years agoRefactor random-seed code out of fork_processes
Ben Darnell [Tue, 5 Jul 2011 00:32:31 +0000 (17:32 -0700)] 
Refactor random-seed code out of fork_processes

14 years agoBetter documentation for HTTPServer startup
Ben Darnell [Tue, 5 Jul 2011 00:17:00 +0000 (17:17 -0700)] 
Better documentation for HTTPServer startup

14 years agoAdd the HTTPServer.add_sockets interface
Ben Darnell [Tue, 5 Jul 2011 00:00:27 +0000 (17:00 -0700)] 
Add the HTTPServer.add_sockets interface

14 years agoPull process forking out of HTTPServer into a new module
Ben Darnell [Mon, 4 Jul 2011 23:32:14 +0000 (16:32 -0700)] 
Pull process forking out of HTTPServer into a new module

14 years agoPull socket creation out of HTTPServer into a new module.
Ben Darnell [Mon, 4 Jul 2011 22:58:17 +0000 (15:58 -0700)] 
Pull socket creation out of HTTPServer into a new module.

14 years agoAdd a better error message for a common assertion
Ben Darnell [Mon, 4 Jul 2011 20:20:19 +0000 (13:20 -0700)] 
Add a better error message for a common assertion

14 years agoRevamp error handling: replace get_error_html with write_error.
Ben Darnell [Mon, 4 Jul 2011 19:16:50 +0000 (12:16 -0700)] 
Revamp error handling: replace get_error_html with write_error.

14 years agoAdd RequestHandler.set_default_headers, which may be overridden to set
Ben Darnell [Mon, 4 Jul 2011 17:17:32 +0000 (10:17 -0700)] 
Add RequestHandler.set_default_headers, which may be overridden to set
headers that will not be reset during error handling.

14 years agoCreate the StackContext in @asynchronous instead of on all requests,
Ben Darnell [Sun, 3 Jul 2011 18:06:27 +0000 (11:06 -0700)] 
Create the StackContext in @asynchronous instead of on all requests,
to improve performance in the synchronous case.

14 years agoBetter handling of errors not generated by an exception; add to release notes
Ben Darnell [Sun, 3 Jul 2011 17:53:03 +0000 (10:53 -0700)] 
Better handling of errors not generated by an exception; add to release notes

14 years agoUpdate next release notes for recent changes
Ben Darnell [Sun, 3 Jul 2011 02:32:51 +0000 (19:32 -0700)] 
Update next release notes for recent changes

14 years agoAdd support for client SSL certificates in simple_httpclient
Ben Darnell [Sun, 3 Jul 2011 01:34:23 +0000 (18:34 -0700)] 
Add support for client SSL certificates in simple_httpclient

14 years agoMerge remote-tracking branch 'eklitzke/tracebacks' into merge
Ben Darnell [Sun, 3 Jul 2011 01:21:53 +0000 (18:21 -0700)] 
Merge remote-tracking branch 'eklitzke/tracebacks' into merge

14 years agoMerge remote-tracking branch 'davidwilemski/master' into merge
Ben Darnell [Sun, 3 Jul 2011 00:29:08 +0000 (17:29 -0700)] 
Merge remote-tracking branch 'davidwilemski/master' into merge

14 years agoUsed tornado.util.import_object 294/head
David Wilemski [Sat, 2 Jul 2011 22:22:51 +0000 (18:22 -0400)] 
Used tornado.util.import_object

14 years agoAllow the caller to specify the listen() backlog in HTTPServer.bind.
Ben Darnell [Sat, 2 Jul 2011 21:36:37 +0000 (14:36 -0700)] 
Allow the caller to specify the listen() backlog in HTTPServer.bind.

14 years agoMerge branch 'master' into merge
Ben Darnell [Sat, 2 Jul 2011 21:20:30 +0000 (14:20 -0700)] 
Merge branch 'master' into merge

14 years agoProperly check for errors on async connect instead of relying on the order
Ben Darnell [Sat, 2 Jul 2011 20:08:03 +0000 (13:08 -0700)] 
Properly check for errors on async connect instead of relying on the order
of events from the IOLoop.

14 years agoSkip ipv6 tests if the system isn't configured for it.
Ben Darnell [Sat, 2 Jul 2011 20:07:46 +0000 (13:07 -0700)] 
Skip ipv6 tests if the system isn't configured for it.

14 years agoFix websocket handshake status line
Ben Darnell [Sat, 2 Jul 2011 19:37:07 +0000 (12:37 -0700)] 
Fix websocket handshake status line

14 years agoAdded dynamic loading of request handlers
David Wilemski [Sat, 2 Jul 2011 07:06:25 +0000 (03:06 -0400)] 
Added dynamic loading of request handlers

This commit implements gh-124.

Users can specify "module.ClassName" rather than load a module that
contains a request handler and then refering to the request handler
class.

14 years agoCheck for the existence of callbacks after running all timeouts
Ben Darnell [Thu, 30 Jun 2011 02:41:02 +0000 (19:41 -0700)] 
Check for the existence of callbacks after running all timeouts

14 years agoimprove the speed of add_callback by avoiding the waker pipe when possible
Evan Klitzke [Thu, 30 Jun 2011 00:50:13 +0000 (17:50 -0700)] 
improve the speed of add_callback by avoiding the waker pipe when possible

14 years agoImprove auth module on python 3 (covers openid and oauth2, but not oauth1.x)
Ben Darnell [Tue, 28 Jun 2011 06:36:20 +0000 (23:36 -0700)] 
Improve auth module on python 3 (covers openid and oauth2, but not oauth1.x)

14 years agoReplace all bare "except:" blocks with "except Exception:" so we don't
Ben Darnell [Mon, 27 Jun 2011 01:51:12 +0000 (18:51 -0700)] 
Replace all bare "except:" blocks with "except Exception:" so we don't
accidentally catch KeyboardInterrupt.