[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about pipe
From: |
Stephane Chazelas |
Subject: |
Re: about pipe |
Date: |
Mon, 21 Feb 2005 22:01:36 +0000 |
User-agent: |
Mutt/1.5.6i |
On Mon, Feb 21, 2005 at 05:19:22AM -0800, gan_xiao_jun@yahoo.com wrote:
[...]
> while running:
>
> myapp 2>/dev/null&
>
> I want to change 2>&1 without stop this job.
> Is there some tips to finish it?
[...]
If you mean that you also want to discard stdout, you can try:
gdb myapp << EOF
attach $!
call dup2(2,1)
detach
EOF
or:
gdb myapp << EOF
set auto-solib-add off
attach $!
share libc\\..*
call dup2(1,2)
detach
EOF
myapp needs to be linked dynamically to the libc and even then,
hat's not guaranteed to work.
--
Stéphane
- about pipe, gan_xiao_jun, 2005/02/21
- Re: about pipe,
Stephane Chazelas <=