tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: shipping processes between ttys



On Sun 07 Dec 2014 at 03:25:36 +0000, David Holland wrote:
> Somebody mentioned reptyr (https://github.com/nelhage/reptyr) in chat
> tonight, and so I was thinking about how one might do it properly;
> this is a topic I've looked at in the past from time to time, so I
> think I have a viable plan for it. Which I'm going to post, both for
> feedback and in the hope that I can trick someone into implementing it
> for me. :-)

For a long time I have sort of wanted some variation on this. I wonder
if your plan can be generalized in a sensible way to accomplish my idea.

Suppose I run some long-running process. It delivers its output to the
tty. After a while I realise that this was a mistake; I want the output
redirected to a file instead. Killing the process and restarting is not
an option (too much time already spent on the task, or whatever). How to
do that?

The same thing, but the other way around. Or with stdin. In other words,
changing the actual files that file descriptors are connected to.
Possibly even plumbing a stdout and stdin together with a pipe.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

Attachment: pgpxljXJqbRqN.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index