Suppose I have a konsole running with a process building a port package and plasma session crashed (again
) and now I want to transfer the process and its sub process to a tty, what's the proper way of doing it? and is reptyr the right tool?
yes the supposition is true, but the way I understood it, reptyr can manage to transfer only one process, not the tree of that process. I did run a make install which has many child process, it still running in the konsole, but the plasma session isn't working.If the supposition is the current reality, it's too late for using tmux. sysutils/reptyr is indeed worth a try.
reptyr works by attaching to the target program using
ptrace(2), redirecting relevant file descriptors,
it migth work but this not a quote from freebsd manpages ,but rather termux. I'll have to check if the option is in freebsd too.-T
Use an alternate mode of attaching, "TTY-stealing". In
this mode, reptyr will not ptrace(2) the target
process, but will attempt to discover the terminal
emulator for that process' pty, and steal the master
end of the pty. This mode is more reliable and flexible
in many circumstances (for instance, it can attach all
processes on a tty, rather than just a single process).
However, as a downside, children of sshd(8) cannot be
attached via -T unless reptyr is run as root. See for
more information about tty-stealing.
reptyr -T [PID]so the man page isn't correct.reptyr supports Linux and FreeBSD. Not all functionality is currently available on FreeBSD. (Notably, FreeBSD doesn't support reptyr -T at this time.
reptyr [PID] it waited for child process to stop, it would have waited the build to be done. This is not what I was looking for. the only option that would have worked doesn't on freebsd.