As of version 0.7.0 pyftpdlib automatically 'handles' SIGTERM (SystemExit) and
SIGINT (KeyboardInterrupt) signals and executes a cleanup before exiting.
Also, it logs when the server starts and stops.
This behavior is generally desirable but there should be the possibility to
turn it off so that the user can decide what to do instead (e.g. log another
message or DO NOT catch the exceptions in the first place or register a signal
handler).
As such I introduced (r1144) a new 'handle_exit' parameter for
FTPServer.server_forever() defaulting to True.
The user will tipically do something like this:
try:
server.server_forever(handle_exit=False)
except (SystemExit, KeyboardInterrupt):
...
...or register a signal handler.
Original issue reported on code.google.com by g.rodola on 27 Jan 2013 at 11:05
Original issue reported on code.google.com by
g.rodola
on 27 Jan 2013 at 11:05