[Twisted-Python] application shutdown and control-C

Hi, When running an application on Windows with twistd, and stopping it with Control-C, sometimes it shuts down properly, and sometimes it just stops abruptly, which also means it doesn't get written to *-shutdown.tap. That's no good! Has anyone experienced this before? Thanks, Antony Kummel __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On Thu, 15 Sep 2005 11:54:52 -0700 (PDT), Antony Kummel <antonykummel@yahoo.com> wrote:
Yep, and I spent about a week trying to fix it, once. I couldn't really figure it out, but I came away with the impression that there isn't *really* such a thing as "signal()" on Windows - programs don't habitually send signals or handle them, especially when sent by hitting C-c in a CMD window - which appears to be subtly different from programmatically sending it. Cygwin utilities appear to have the same issue; on 1 out of 100 runs (for me, anyway), C-c'ing a hosed process will terminate it instantly with no cleanup. Also, command-line Python will usually generate a KeyboardInterrupt, but sometimes just exit immediately. The busier it is, the more likely to just die (it seems) but I have never managed a direct correlation. Terminating any reactor normally on Windows, with .stop(), works fine, though.

On Thu, 15 Sep 2005 11:54:52 -0700 (PDT), Antony Kummel <antonykummel@yahoo.com> wrote:
Yep, and I spent about a week trying to fix it, once. I couldn't really figure it out, but I came away with the impression that there isn't *really* such a thing as "signal()" on Windows - programs don't habitually send signals or handle them, especially when sent by hitting C-c in a CMD window - which appears to be subtly different from programmatically sending it. Cygwin utilities appear to have the same issue; on 1 out of 100 runs (for me, anyway), C-c'ing a hosed process will terminate it instantly with no cleanup. Also, command-line Python will usually generate a KeyboardInterrupt, but sometimes just exit immediately. The busier it is, the more likely to just die (it seems) but I have never managed a direct correlation. Terminating any reactor normally on Windows, with .stop(), works fine, though.
participants (3)
-
Antony Kummel
-
glyph@divmod.com
-
Itamar Shtull-Trauring