Re: Prevent respawning of childprocesses
Eric Larson <[email protected]>
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <CACVB7s6kj64gb8z0Pd-ZHK-M6ir-ZYySYg0uECuxjDXpDqcwOQ@mail.gmail.com> |
On Mon, Feb 1, 2016 at 12:14 AM, Anfernee Jervis <[email protected]> wrote: > I currently have a script that spawns a few childprocesses and then starts a > cherrypy server. However I've run into the problem where whenever I edit the > code on the script, the childprocesses are respawned and temporarily > orphaned until I issue a ctrl + c to kill the main process. I end up having > the main process, and an extra set of child processes (if the script spawns > 2, ill end up with 4 but only the recently spawned ones will be used). > > How can I stop cherrypy from respawning the process? If I cant do that then > how can I set cherrypy to terminate the main process before starting it > again? The childprocesses are daemons and should terminate if the main > process terminates. > > Another solution I have in mind is a clean up function that execute right > before cherrypy respawns the main process. Is that possible? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "cherrypy-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > Visit this group at https://groups.google.com/group/cherrypy-users. > For more options, visit https://groups.google.com/d/optout. Have you looked into the WSPBus? https://cherrypy.readthedocs.org/en/3.3.0/refman/process/wspbus.html I've seen this used to do things like spinning up development db instances, extra process, etc. -- Eric Larson -- You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.