After attaching, the process will take input from and write output to the new terminal, including ^C and ^Z. (Unfortunately, if you background it, you will still have to run "bg" or "fg" in the old terminal. This is likely impossible to fix in a reasonable way without patching your shell.)
While backgrounded you can open your terminal multiplexor (like tmux or screen)
reptyr $PID
detach from the session, then while it is backgrounded.
jobs
Get the name of the $0 argument (usually sudo or the binary name)
disown $binaryname
Which will detach the process from your existing terminal, leaving the terminal multiplexor session independant.
While backgrounded you can open your terminal multiplexor (like tmux or screen)
reptyr $PID
detach from the session, then while it is backgrounded.jobs
Get the name of the $0 argument (usually sudo or the binary name)disown $binaryname
Which will detach the process from your existing terminal, leaving the terminal multiplexor session independant.