[augeas-devel] [Augeas] #241: --interactive mode fails to reopen stdout as another user (not root)
Augeas
trac at fedorahosted.org
Sun Jan 1 22:54:10 UTC 2012
#241: --interactive mode fails to reopen stdout as another user (not root)
----------------------+----------------------
Reporter: raphink | Owner: domcleal
Type: defect | Status: assigned
Priority: minor | Milestone: next
Component: Augeas | Version: devel
Resolution: | Keywords:
Blocked By: | Blocking:
----------------------+----------------------
Changes (by domcleal):
* owner: lutter => domcleal
* status: new => assigned
Comment:
Replying to [comment:2 mchapman]:
> However I'm wondering whether `rl_outstream` should also be connected to
`/dev/tty`, as `rl_instream` is a few lines above this. What is the
intended behaviour when standard output is redirected?
>
> {{{
> echo "ls /" | augtool -i >outfile
> }}}
I think connecting both rl_outstream and stdout to `/dev/tty` is probably
the least surprising behaviour. Then the user gets a switch into a fully
interactive mode on their tty and stdout is no longer piped to the file.
Today I came across the combination of `augtool -ief foo` not working
(`Failed to reopen stdout: No such file or directory`) which is very
similar. It seems the best course is to only re-open rl_outstream when
not connected to a tty, but then to re-open `/dev/tty` as you suggest.
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/241#comment:3>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list