If your wrapper is a bash script, you could try to call your python program via bash's "exec", which will replace the former with the latter without spawning a new process. See e.g.
http://wiki.bash-hackers.org/commands/builtin/exec /n On 09/06/17 22:37, Carlos Konstanski wrote: > I have a python process that I launch via a wrapper script. The wrapper > is responsible for ensuring that the virtualenv exists, that all the > packages in requirements.txt are installed, that the virtualenv is > activated, and finally it launches the python program. > > When I run it under supervisord, the wrapper script is the process that > is being managed. The actual python program is a child-of-a-child and > supervisord knows nothing about it. > > I performed the following experiment: I killed the wrapper script. The > result was that the child python process kept running but was now a > child of init (a top-level process). supervisord relaunched the wrapper > script. Now I had two python processes running. > > How can I get supervisord to have knowledge of both the wrapper script > and its children? Alternatively, I wonder if there's a way to make my > python program die if the wrapper script dies. That would be just as > good. > > Thanks, > Carlos Konstanski > _______________________________________________ > Supervisor-users mailing list > Supervisor-users@lists.supervisord.org > https://lists.supervisord.org/mailman/listinfo/supervisor-users > -- Nils Toedtmann, Systems Architect & Director nils.toedtm...@demandlogic.co.uk +44 (0) 7821 817722 _ Demand Logic Limited office: Here East, Queen Elizabeth Olympic Park, London E20 3BS, UK http://www.demandlogic.co.uk/ i...@demandlogic.co.uk +44 (0) 20 7193 4212 _______________________________________________ Supervisor-users mailing list Supervisor-users@lists.supervisord.org https://lists.supervisord.org/mailman/listinfo/supervisor-users