I run a lot of long running processes (simulations) that print progress to STDOUT
. I occasionally forget to redirect to STDOUT
to a file I can grep
, and it's usually too far along to restart.
QUESTION: Without stopping the process, is there a way I can hook into another STDOUT
?
These are always running in GNU screen with ZSH on OS X 10.7.3.
Best Answer
There is a clever hack mentioned here that uses GDB to attach to the process, and a utility named
dupx
wraps up this functionality.From the
dupx
manpage: