⬅︎ Back to The importance of env (and how it works with virtualenv)
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 runserver25654 pts/7 R+ 0:00 grep python
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.
$ head -1 test.py ; ./test.py & ps axc | grep test.py ; echo done#!/usr/bin/env python[1] 14079done$ head -1 test.py ; ./test.py & ps axc | grep test.py ; echo done#!/usr/bin/python[1] 1408614086 pts/12 R 0:00 test.pydone
I see! Thanks!
Comment
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
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
$ 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
I see! Thanks!