> Okay, I'm having an additional problem with this... maybe I'm > misunderstanding something... > > The process started by smart-attach-daemon2 is actually a shell that runs > the process I need. The PID stored in the given file points to that shell > and not the actual process. If I do a "kill `cat process.pid`" then it > only kills that shell and not the actual child process associated with it. > Then uwsgi proceeds to re-run that shell and I end up with two running > daemons. > > Is there a simpler way of doing this other than hunting through "ps"? > Sometimes I need to shut down uwsgi and all of the attached daemon > processes as well. >
your "final" process should eventually create an additional pidfile (obviously not with the same name). If you can't (maybe you have special reason) we can think about implementing fork()-tracking (like upstart/systemd) > > On Wed, May 28, 2014 at 10:51 AM, Tim Tisdall <[email protected]> wrote: > >> good point. :) I should have thought of that. Thanks. >> >> >> On Wed, May 28, 2014 at 10:49 AM, Łukasz Mierzwa <[email protected]> >> wrote: >> >>> Just stop this process using SIGTERM, you don't need any special signal >>> handling for that. uWSGI will restart any daemon if it exits. >>> >>> >>> 2014-05-28 16:41 GMT+02:00 Tim Tisdall <[email protected]>: >>> >>>> I was using "attach-daemon" to run some support processes that I'd >>>> like >>>> to keep running when I do a restart. I found in the docs >>>> "smart-attach-daemon2" to keep the process running on restart, but >>>> what do >>>> you do if you want to restart one of those attached daemon processes? >>>> Does >>>> the process need to handle signals itself and then I just send a >>>> signal >>>> directly to that process? >>>> >>>> Or would I need to switch to "attach-daemon2" for this type of thing? >>>> >>>> - Tim >>>> >>>> _______________________________________________ >>>> uWSGI mailing list >>>> [email protected] >>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >>>> >>>> >>> >>> >>> -- >>> Łukasz Mierzwa >>> >>> _______________________________________________ >>> uWSGI mailing list >>> [email protected] >>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >>> >>> >> > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
