0

If I've started a process, e.g. java hello.java, is it possible to switch to screen, so I can disconnect from the server, but have the process continue to run?

Adam_G
  • 7,337
  • 20
  • 86
  • 148

2 Answers2

1

No, it is not possible to move a process started outside of a screen session into a screen session.

nobody
  • 19,814
  • 17
  • 56
  • 77
1

Its possible to move a process under screen using reptyr, here is an example. But be sure to do (as root):

echo 0 > /proc/sys/kernel/yama/ptrace_scope

on recent Ubuntu systems.

ismail
  • 46,010
  • 9
  • 86
  • 95