Skip to content

Instantly share code, notes, and snippets.

Andrey Tarantsov andreyvit

View GitHub Profile
@zaius
zaius / background.sh
Created Jan 16, 2011
How to redirect a running process output to a file and log out
View background.sh
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)
You can’t perform that action at this time.