Skip to content

Stopping server with Ctrl-C or signals does not work with Jython or IronPython #14

Closed
@pekkaklarck

Description

@pekkaklarck

With Python Ctrl-C stops the server fully. With Jython and IronPython stopping is initiated but the process doesn't return and there is a traceback on the console. The server exits if it is ever used again.

The problem is caused by differences in handling exceptions raised by signal handlers. With Python the exception we use breaks the loop in serve_forever, but with Jython and IronPython it is just logged to console. A fix is removing this hack solution and using timeout in handle_request inside the main loop.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions