This question already has an answer here:

I started a process from the command line, but the window server died. However I see the process I started is still running. Is it possible to connect a terminal to the process to see its output?

This is the process:

ps -A | grep foo
73186 ??       4011:34.91 ./foo

marked as duplicate by Celada, cuonglm, jasonwryan, Ramesh, Gilles bash Apr 27 '15 at 19:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.