Created
January 16, 2011 23:29
-
Star
(112)
You must be signed in to star a gist -
Fork
(22)
You must be signed in to fork a gist
-
-
Save zaius/782263 to your computer and use it in GitHub Desktop.
How to redirect a running process output to a file and log out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | |
| detach | |
| quit | |
| # Back in shell | |
| disown | |
| logout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wayback Machine does, https://web.archive.org/web/20170523123913/http://www.isi.edu/~yuri/dupx/