Comment

Peter Bengtsson

I don't think so. Not in bash (ubuntu).

$ cat manage.py | head -1
#!/usr/bin/env python
$ ./manage.py runserver &
$ ps ax | grep env
$ px ax | grep python
25582 pts/8 Sl+ 0:00 /home/peterbe/dev/DJANGO/myapp/bin/python ./manage.py runserver
25654 pts/7 R+ 0:00 grep python

Parent comment

Ilpo

A reason not to use /usr/bin/env is that then the name of the process is not the name of the script. Having the script name as the process name is helpful in looking at process listings and when it is behaving badly and you need to kill it.

Replies

Ilpo

$ head -1 test.py ; ./test.py & ps axc | grep test.py ; echo done
#!/usr/bin/env python
[1] 14079
done
$ head -1 test.py ; ./test.py & ps axc | grep test.py ; echo done
#!/usr/bin/python
[1] 14086
14086 pts/12 R 0:00 test.py
done

Peter Bengtsson

I see! Thanks!