diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-08-17 21:00:46 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-08-17 21:08:55 +0100 |
commit | 5199f7bf4434b337a538a880f60deaee12771b49 (patch) | |
tree | ac3c841bb852a59509e8a447b82a8bfdffac481a /lib | |
parent | 4c0d2dd1229505c5b7fa58b8591fe37d3e66e306 (diff) | |
download | dotfiles-5199f7bf4434b337a538a880f60deaee12771b49.tar.gz |
system_pty_capture issues with sudo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/perl5/Local/Interactive.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/perl5/Local/Interactive.pm b/lib/perl5/Local/Interactive.pm index 0b80c75b..5ad1ea11 100644 --- a/lib/perl5/Local/Interactive.pm +++ b/lib/perl5/Local/Interactive.pm @@ -138,6 +138,12 @@ We use script(1) because it's widely available. An alternative is unbuffer(1) from the 'expect' package, or see perl function C<terminal_friendly_spawn()> in the myrepos program. +Note that if C<$cmd> will cause sudo to prompt for a password, that +will be forgotten when system_pty_capture() returns. So sequential +system_pty_capture("sudo ...") calls will each prompt the user for +their password, bypassing sudo's usual timeout between requiring a +password. + =cut sub system_pty_capture { |