Bug#333138: [Pkg-shadow-devel] Bug#333138: chfn behaves bogusly when either fd 0, 1 or 2 is not a tty

Alexander Gattin xrgtn at yandex.ru
Tue Oct 11 17:47:08 UTC 2005


retitle 333138 chfn/chsh: no prompt when stdout is a tty while stdin isn't
severity 333138 wishlist
thanks

Hi!

On Tue, Oct 11, 2005 at 10:48:36AM +0200, Robert Millan wrote:
> No, there's a bug that needs fixing.

No, there's only 1 BTW very common issue which does not
need any fixing IMNSHO.

Interactive operation works, cmdline operation works.
What else? Nobody promised operating in semi- or
improperly emulated interactive modes (proper
emulation is achieved with expect, python-expect,
libexpect-perl or alike).

Citing `man expect`:
>        For example, here are some things Expect can do:
>               ...
>               *   Run fsck, and in response to its  questions,  answer  "yes",
>                   "no"  or  give  control  back to you, based on predetermined
>                   criteria.
>               ...
>               *   Carry environment variables, current directory, or any  kind
>                   of information across rlogin, telnet, tip, su, chgrp, etc.
> 
>        There  are  a  variety  of  reasons  why the shell cannot perform these
>        tasks.  (Try, you’ll see.)  All are possible with Expect.
please consider what's stated there.

> And as said before the fix is as simple as adding an fflush call.

Yes, it's my words.

> Did you see the patch I just sent?

I personally (we all?) didn't see any patch from you,
although, well, today _I_ am actually experimenting
with shadow hacked with my own patches which among
others include a workaround for this issue you suffer
from.

But this insertion of fflush() here and there without
any defined plan etc. is just chaotic patching/fixing,
it won't resolve the conceptual issues -- and even with
"shadow" patched to its furthest limits, you would
still require to use smth. expect-like for your
purposes, becaue there are still awk/grep/sed (*) and
other old good :/ Unix utils besides shadow suite...

(*) http://suxx.kak-sam.to/awkgrep.jpg

-- 
WBR,
xrgtn




More information about the Pkg-shadow-devel mailing list