A user has started a Java program and is currently running.
As root, I can see it through ps -A
.
How can I bring this process to foreground?
A user has started a Java program and is currently running.
As root, I can see it through ps -A
.
How can I bring this process to foreground?
The short answer is: A process can only be brought to the foreground in the terminal it was started in. Its stdin, stdout and stderr are linked to that window and they can't be changed from the outside i.e. from another process.
The long answer is: There are some options to see some of its output, see here
echo 'abcd' > /proc/PID/fd/0
, but they are likely not executed. Another option is to usereptyr -s PID
. (I couldn't get it to work though). In both casesPID
is the process id of the process you are trying to attach to. – NZD Aug 03 '15 at 07:55