-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Importing setproctitle changes argv #49
Comments
This is how setproctitle works. If it is a showstopper for you, don't use it. |
This means you can only use the module in a restricted setting. |
Just ran into this. As a result, if setproctitle is imported during execution of a sitecustomize.py, it is not possible to pass arguments to python scripts:
In my case the import of setproctitle was a consequence of importing pystatsd. |
Well, I think this is supper weird. Why do you intend such a behavior? It changes the sensible default behavior. |
Importing setproctitle changes argv in unexpected ways.
Test case attached.
test_setproctitle.zip
Before import:
argv[0]: ./test_setproctitle
argv[1]: 1
argv[2]: 2
argv[3]: 3
After import:
argv[0]: ./test_setproctitle 1 2 3
argv[1]: 1 2 3
argv[2]: 2 3
argv[3]: 3
This is related to #45 and #46. But it is also different.
This was very hard to find (took me 1 day). Also, it is a show stopper. Thus, the severity is quite high (for me).
Tested with 1.1.7 and 1.1.10.
The text was updated successfully, but these errors were encountered: