Unwanted SetConsoleCtrlHandler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unwanted SetConsoleCtrlHandler

yaworsky

Hi there,

in some cases setting of console handler immediately after import
cherrypy is unwanted

here is proposed solution http://groups.google.com/group/cherrypy-devel/web/win32ctrlhandler.patch

Regards,
Alexander.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted SetConsoleCtrlHandler

Robert Brewer-4

yaworsky wrote:
> in some cases setting of console handler immediately after import
> cherrypy is unwanted
>
> here is proposed solution http://groups.google.com/group/cherrypy-
> devel/web/win32ctrlhandler.patch

Thanks for the feedback! Can you explain in what circumstances the
console handler is unwanted? Are you using CherryPy with some other
framework, or are you not using a console?

I think that if it's going to be optional, then it should be moved to a
listener plugin (for the 'start' channel) rather than overridden in the
bus itself.

Care to open a ticket for this issue? http://www.cherrypy.org/newticket
(user/pass at the bottom of that page).


Robert Brewer
[hidden email]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted SetConsoleCtrlHandler

yaworsky

> Thanks for the feedback! Can you explain in what circumstances the
> console handler is unwanted? Are you using CherryPy with some other
> framework, or are you not using a console?

I'm running Trac behind WSGI server under control of other win32-
service framework which internally uses console handlers. Of course
multiple handlers is not a problem (I hope :), the problem is rather
related with shutdown of WSGI server, discussed in neighbour thread.
But pure WSGI applications do not need the bus so I think any API
calls should be moved to the start routine or

> I think that if it's going to be optional, then it should be moved to a
> listener plugin (for the 'start' channel) rather than overridden in the
> bus itself.

here, I agree -- I did not dig deep into details yet :).

> Care to open a ticket for this issue?http://www.cherrypy.org/newticket
> (user/pass at the bottom of that page).

First I'd like to try to move other, real CherryPy apps to 3.1. There
may be other issues related with the implementation of wspbus under
win32 -- I'd like to keep existing service framework but it seems
wspbus establishes strong policy.

Thanks.

Alexander.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted SetConsoleCtrlHandler

Robert Brewer-4

yaworsky wrote:
> I'm running Trac behind WSGI server under control of other win32-
> service framework which internally uses console handlers. Of course
> multiple handlers is not a problem (I hope :), the problem is rather
> related with shutdown of WSGI server, discussed in neighbour thread.
> But pure WSGI applications do not need the bus so I think any API
> calls should be moved to the start routine or
>
> > I think that if it's going to be optional, then it should be moved
to
> > a listener plugin (for the 'start' channel) rather than overridden
in
> > the bus itself.
>
> here, I agree -- I did not dig deep into details yet :).

Okay, implemented in http://www.cherrypy.org/changeset/1842.


Robert Brewer
[hidden email]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---