Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

something not working with python -m #8

Closed
dvarrazzo opened this issue Jun 2, 2010 · 1 comment
Closed

something not working with python -m #8

dvarrazzo opened this issue Jun 2, 2010 · 1 comment
Labels

Comments

@dvarrazzo
Copy link
Owner

Originally submitted by daniele.varrazzo as issue 8:

Reported by Raymond Rizzuto. Confirmed on Ubuntu with Python 2.6.

What steps will reproduce the problem?

$ cat test.py
import setproctitle
print setproctitle.getproctitle()
$ python -m test

What is the expected output?

python -m test

What do you see instead?

python -

the process title in /proc/PID/cmdline reads as "python -\x00\x00test\x00"

The result is not fixed after using setproctitle():

$ cat test2.py
import setproctitle
setproctitle.setproctitle('012345678901234')
print "proctitle", setproctitle.getproctitle()
print "cmdline", repr(open("/proc/self/cmdline").read())

$ python -t test2.py # this works
proctitle 012345678901234
cmdline '012345678901234\x00\x00\x00\x00'

$ python -m test2 # this not
proctitle 01234567
cmdline '01234567\x00\x00test2\x00'

@dvarrazzo
Copy link
Owner Author

Comment by daniele.varrazzo:

This issue was closed by revision 6f1d91bdbe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant