Title: Add subprocess.shell(cmd) function: similar to os.system(), but use subprocess · Issue #120952 · python/cpython · GitHub
Open Graph Title: Add subprocess.shell(cmd) function: similar to os.system(), but use subprocess · Issue #120952 · python/cpython
X Title: Add subprocess.shell(cmd) function: similar to os.system(), but use subprocess · Issue #120952 · python/cpython
Description: Feature or enhancement Hi, I propose to add a subprocess.shell(cmd) function similar to os.system(), but use subprocess: close file descriptors, restore signal handlers, etc. The function runs a shell command and so is vulnerable by desi...
Open Graph Description: Feature or enhancement Hi, I propose to add a subprocess.shell(cmd) function similar to os.system(), but use subprocess: close file descriptors, restore signal handlers, etc. The function runs a sh...
X Description: Feature or enhancement Hi, I propose to add a subprocess.shell(cmd) function similar to os.system(), but use subprocess: close file descriptors, restore signal handlers, etc. The function runs a sh...
Opengraph URL: https://github.com/python/cpython/issues/120952
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add subprocess.shell(cmd) function: similar to os.system(), but use subprocess","articleBody":"# Feature or enhancement\n\nHi,\n\nI propose to add a `subprocess.shell(cmd)` function similar to `os.system()`, but use `subprocess`: close file descriptors, restore signal handlers, etc. The function runs a shell command and so is vulnerable by design to shell injection vulnerability if an attacker can modify the shell command.\n\nThe function accepts keyword arguments: `subprocess.shell(cmd, env=env)`, `subprocess.shell(cmd, stdout=subprocess.PIPE)`, etc.\n\nThis proposition is related to os.system() soft deprecation: https://github.com/python/cpython/pull/120744\n\nWhat do you think?\n\nVictor\n\ncc @gpshead @zooba \n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-121093\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2024-06-24T14:06:21Z","url":"https://github.com/python/cpython/issues/120952"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e1b7301b-8379-f095-388e-c78ebc296f96 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFC2:30DBED:349E680:457CBAE:6B0036FF |
| html-safe-nonce | 3391e1be1bb1cf2733262c9064a83e2fc1bc2884c310442fe7410d9e622fb3d6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkMyOjMwREJFRDozNDlFNjgwOjQ1N0NCQUU6NkIwMDM2RkYiLCJ2aXNpdG9yX2lkIjoiNzI1OTg5MTI5MjE5MTA3ODE0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d8c657f759023b6c1621f7344f146baba5adce9989b88258d4c5705110b02203 |
| hovercard-subject-tag | issue:2370349988 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/120952/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d4b552fc7add1b28300258f4309c986ab92052ed4cd3f5240b6a6a5726b71d6a/python/cpython/issues/120952 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d4b552fc7add1b28300258f4309c986ab92052ed4cd3f5240b6a6a5726b71d6a/python/cpython/issues/120952 |
| og:image:alt | Feature or enhancement Hi, I propose to add a subprocess.shell(cmd) function similar to os.system(), but use subprocess: close file descriptors, restore signal handlers, etc. The function runs a sh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width