-1

I am working in CentOS 7.3 and I kicked off a couple of lengthy processes, unfortunately in the foreground. Then I went away from the terminal and was disconnected from my VPN due to inactivity. So I reestablished my connection and I can see the processes are still active and I get PIDs. Is there any way I can reclaim the process STDOUT if it was just printing to the console and not streamed into a file?

amphibient
  • 12,472
  • 18
  • 64
  • 88
  • 1
    Probably not, and the worse news is when your lengthy processes write to stdout they will probably get signals which kill them. – icarus Feb 19 '17 at 03:23

1 Answers1

2

If the processes are still active and didn't get killed, you can use repytr or reredirect to attach them to a new terminal, see this question.

The way to avoid this problem is to use screen or tmux before you start processes on remote machines.

dirkt
  • 32,309