Answer the question
In order to leave comments, you need to log in
Linux: reattach console to process?
Business was from under ssh in bash.
I ran some program for several days, which occasionally prints messages to standard output. Then I did
Ctrl-Z
$ bg
$ logout
The next day I logged in again and see the program in the list of processes. Still working, damn it.
Is it possible to attach the output of the program back to the console / see its output?
If so, how?
PS/ I understand that if I had done something like “progname | tee ./log-file", then this question could have been avoided, but the process cannot be interrupted.
UPD: after re-login, jobs does not hang, unfortunately.
Answer the question
In order to leave comments, you need to log in
The question is 3 years old already, however:
reptyr is a utility for taking an existing running program and
attaching it to a new terminal, and is particularly useful for moving
a long-running process into a GNU screen session.
At the first attempt to output something to the logged-out terminal, the program will end with SIGHUP (unless, of course, it specifically processes this signal and is not launched via nohup).
Therefore, judging by the fact that she is still working, she has not yet tried to deduce anything.
Perhaps this will give some hint on the topic of what she is thinking about there.
If the process is hanging in jobs, then fg %1 (or whatever). If it doesn't, then I don't know.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question