bash hangs when using exec 2...

2015-03-14 Thread kontakt
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu  
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -
DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-l$
uname output: Linux josua 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 11  
Release Status: release

Description:
exec hangs up when using exec 2SOMETHING. Just tested on Ubuntu 
14.04, Ubuntu 12.04, Debian7
working when just using exec 1SOMETHING

Repeat-By:
using in a script for logging
or just try it in bash or dash 

Fix:
Dont't know how to fix it
Just using the workaround with PATH/SCRIPT 2SOMETHING which does 
not use exec






Re: bash hangs when using exec 2...

2015-03-14 Thread Davide Brini
On Sat, 14 Mar 2015 15:17:24 +0100, kont...@marcbihlmaier.de wrote:

 Description:
 exec hangs up when using exec 2SOMETHING. Just tested on
 Ubuntu 14.04, Ubuntu 12.04, Debian7
 working when just using exec 1SOMETHING
 
 Repeat-By:
 using in a script for logging
 or just try it in bash or dash 
 
 Fix:
 Dont't know how to fix it
 Just using the workaround with PATH/SCRIPT 2SOMETHING which
 does not use exec

It's not hanging, it's just that bash uses fd 2 to show the prompt and
what the user types. Try typing a command and hitting enter while bash seems
to be hung.

Alternatively, do a cat SOMETHING in another console, and you'll see the
prompts and the commands you typed.


-- 
D.