Title: Got errors when using sudo with ps · Issue #1043 · pyinvoke/invoke · GitHub
Open Graph Title: Got errors when using sudo with ps · Issue #1043 · pyinvoke/invoke
X Title: Got errors when using sudo with ps · Issue #1043 · pyinvoke/invoke
Description: Hi, This is not exactly an issue, more of a warning for people having this kind of issues. It is both related to the invoke and the paramiko library I am using fabric (which is based on paramiko and invoke) in order to retrieve a list of...
Open Graph Description: Hi, This is not exactly an issue, more of a warning for people having this kind of issues. It is both related to the invoke and the paramiko library I am using fabric (which is based on paramiko an...
X Description: Hi, This is not exactly an issue, more of a warning for people having this kind of issues. It is both related to the invoke and the paramiko library I am using fabric (which is based on paramiko an...
Opengraph URL: https://github.com/pyinvoke/invoke/issues/1043
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Got errors when using sudo with ps","articleBody":"Hi,\n\nThis is not exactly an issue, more of a warning for people having this kind of issues. It is both related to the invoke and the paramiko library\n\nI am using fabric (which is based on paramiko and invoke) in order to retrieve a list of running processus on a Debian server with `ps axww -o pid=,ppid=,etimes=,command=`. At that time, I used the sudo function to run it.\n\nFrom time to time, I got a ThreadException, and it came out that it was coming from the invoke library: when doing the ps command, I got the following output:\n```\n3432669 1 0 /lib/systemd/systemd --user\n3432670 3432669 0 (sd-pam)\n3432716 2 0 [kworker/9:1]\n3432730 3432625 0 sshd: xxx@notty\n3432731 3432730 0 sudo -S -p [sudo] password: ps axww -o pid=,ppid=,etimes=,command=\n3432732 3432731 0 ps axww -o pid=,ppid=,etimes=,command=\n```\n\nAs the `-p [sudo] password:` option appears in the command output, the `watchers.Responder.submit` function returns matches, and triggers the `runner.Runner.handle_output -\u003e _handle_output -\u003e respond -\u003e write_proc_stdin` function, thinking it should send the password.\n\nAs the paramiko channel get closed once the command output is printed, the `write_proc_stdin` sometimes tries to write the password after the channel closure, which triggers a ThreadException `OSError: Socket is closed`\n\n(Sorry if I am not using the correct terminology, I am not a developer)","author":{"url":"https://github.com/MiniPierre","@type":"Person","name":"MiniPierre"},"datePublished":"2025-07-23T07:54:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1043/invoke/issues/1043"}
| 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:efd6f1d4-cc3a-0fd9-499f-f4925bcb8a16 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD4A:2625A:65A78:850D9:69930194 |
| html-safe-nonce | 44bcbf94714eefaad1db2a195ed3bd3253802322405c828ec29df2566764cf76 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDRBOjI2MjVBOjY1QTc4Ojg1MEQ5OjY5OTMwMTk0IiwidmlzaXRvcl9pZCI6IjI0MDEyMjk0MTk5NzA3NTcwMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 80f5126ca209515071b2763c41f7bb4e1c93f755689a9dded1126cd8c1bd8a3f |
| hovercard-subject-tag | issue:3255311089 |
| 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/pyinvoke/invoke/1043/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06cdbb8234b8b3d1456a85481a164ec9b730808e6a91138979a9afe6a0f1955f/pyinvoke/invoke/issues/1043 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06cdbb8234b8b3d1456a85481a164ec9b730808e6a91138979a9afe6a0f1955f/pyinvoke/invoke/issues/1043 |
| og:image:alt | Hi, This is not exactly an issue, more of a warning for people having this kind of issues. It is both related to the invoke and the paramiko library I am using fabric (which is based on paramiko an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MiniPierre |
| hostname | github.com |
| expected-hostname | github.com |
| None | 348cc0594c4976eb4050dc9547ecf65057ee89a2b7ed0652b983b9b539f57145 |
| turbo-cache-control | no-preview |
| go-import | github.com/pyinvoke/invoke git https://github.com/pyinvoke/invoke.git |
| octolytics-dimension-user_id | 1486921 |
| octolytics-dimension-user_login | pyinvoke |
| octolytics-dimension-repository_id | 3587206 |
| octolytics-dimension-repository_nwo | pyinvoke/invoke |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3587206 |
| octolytics-dimension-repository_network_root_nwo | pyinvoke/invoke |
| 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 | 91a0a74305bca931ec621f52a6782246d341466f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width