-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-143511: Document sys.remote_exec permissions requirements #143575
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
base: main
Are you sure you want to change the base?
Changes from 13 commits
91c984c
d1256a4
c96d1aa
9f6d131
fe77ba9
6687123
9d3be80
9290444
17d72e6
a92496d
eacadb1
92fc961
809133b
fd20f01
269d9ff
21f8da8
f47c3d6
5e9f8d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1995,7 +1995,27 @@ | |
| The remote process must be running a CPython interpreter of the same major | ||
| and minor version as the local process. If either the local or remote | ||
| interpreter is pre-release (alpha, beta, or release candidate) then the | ||
| local and remote interpreters must be the same exact version. | ||
| local and remote interpreters must be the same exact version. | ||
|
|
||
| Note that the remote process must be able to read the temporary script file in terms | ||
| of permissions. If the caller is running under different user than the process, | ||
| the caller should grant permissions (typically ``os.fchmod(filename, 0o644)``). | ||
|
|
||
| Callers should adjust permissions before calling, for example:: | ||
|
|
||
| import os | ||
| import sys | ||
| import tempfile | ||
|
|
||
| with tempfile.NamedTemporaryFile( | ||
| mode='w', | ||
| suffix='.py', | ||
| delete_on_close=False, | ||
|
||
| ) as f: | ||
| f.write("print('Hello from remote!')") | ||
| f.flush() | ||
| os.chmod(f.name, 0o644) # Readable by group/other | ||
| sys.remote_exec(pid, f.name) | ||
|
|
||
| See :ref:`remote-debugging` for more information about the remote debugging | ||
| mechanism. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.