Subject: Re: bug#56336: 28.1.90; [28.1] Emacs prompts for password when output from async command contains "password:"

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 04 Jul 2022 12:53:18 +0200

Jan Synáček <[email-masked]> writes:

> Well, I know about one thing that might work well enough as an
> additional heuristic just for this case.
>
> It seems that if a command only outputs to stdout (and probably to
> stderr as well) and doesn't really ask for input, lsof -p <that async
> process> shows something like this:
> $ lsof -p 145475

[...]

> Note the /dev/tty in the output. I'm not sure, but I think this might
> be good enough.

It's not portable across operating systems, though.  (And the processes
may play shenanigans with detaching and spawning other processes that
then ask for a password (think xdg-open and friends), so it's not
reliable on Linux either.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no