savrus / uguu

Automatically exported from code.google.com/p/uguu
Other
3 stars 1 forks source link

Signals handling #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It will be good for scripts to gracefully rollback changes in database and
then exit on some per-process and per-system events: SIG_BREAK, system
shutdown etc. For example, during system shutdown script will be killed
anyway and database will rollback changes automatically, but doing this
manually will speed up the shutdown process (and, may be, give postgres
more time to end work).

First of all, reaction for termination events is desirable for spider,
because sometimes it causes strong database loads.

Btw, should low-level scanners end with ESTAT_NOCONNECT code on shutdown?

Original issue reported on code.google.com by radist...@gmail.com on 21 Feb 2010 at 9:58

GoogleCodeExporter commented 9 years ago
Seems, windows' c-runtime handles only CTRL_C_EVENT and CTRL_BREAK_EVENT in
ConsoleCtrlHandler. So this issue hardly has cross-platform solution.

Original comment by radist...@gmail.com on 21 Feb 2010 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by radist...@gmail.com on 21 Feb 2010 at 10:26