On May 19, 10:38 pm, Leonardo Gonzalez <
medici...@gmail.com> wrote:
> I use the same parameter trick to identify separate processes. I protect against termination upon logout by prepending the command with nohup:
> # nohup python server.py&
> [12345]
>
> I terminate with kill but just send a SIGTERM signal instead of a SIGKILL, so there's no need for the -9:
> # kill 12345
>
> Cheers,
>
> Leonardo
>
> On May 19, 2012, at 8:43 AM, william opensource4you <
william.o...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello Anupam,
>
> > Here after a small script I'm using for websites
> > "
> > wi@myarchhost:~/projects/c-cha$ more run.sh
> > #!/bin/bash
>
> > ulimit -c unlimited
> > export PYTHONPATH=/home/admin/mypymodules
> > cd /home/admin/c-cha
> > /usr/bin/python run.py myccahwebsite>> log.log
> > "
>
> > I'm starting it via SSH by doing a "run.sh &".
> > No problems to logout.
>
> > For the stop, I'm killing it.
> > I don't know better way to do it :-(.
> > If you look at start/stop scripts of some Linux distros (ubuntu, ...)
> > they are storing the pid in a specific file and kill the process by
> > re-using the pid stored.
>
> > To better identify each Fapws instances, I'm passing a parameter to
> > python. This parameter is not used, but allow you to retreive the
> > exact Fapws instance you are looking for.
> > This is usefull in case you start several Fapws in parallel.
>
> > Regards,
>
> > W
>