From owner-freebsd-questions Sat Mar 13 8:17:12 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mauve.csi.cam.ac.uk (mauve.csi.cam.ac.uk [131.111.8.38]) by hub.freebsd.org (Postfix) with ESMTP id E3CF514EF1 for ; Sat, 13 Mar 1999 08:17:07 -0800 (PST) (envelope-from bjc23@cam.ac.uk) Received: from bjc23.trin.cam.ac.uk ([131.111.193.197]) by mauve.csi.cam.ac.uk with esmtp (Exim 2.05 #3) id 10Lr5i-0007n8-00; Sat, 13 Mar 1999 16:16:46 +0000 Received: from bjc23 by bjc23.trin.cam.ac.uk with local-esmtp (Postman Pat (and his black and white cat)) id 10Lr5i-0000IU-00; Sat, 13 Mar 1999 16:16:46 +0000 Date: Sat, 13 Mar 1999 16:16:46 +0000 (GMT) From: "Ben J. Cohen" X-Sender: bjc23@bjc23.trin.cam.ac.uk Reply-To: bjc23@hermes.cam.ac.uk To: sporkl@ix.netcom.com Cc: questions@FreeBSD.ORG Subject: Re: Redirection of processes and of X clients In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 13 Mar 1999, Spike wrote: >On Sat, 13 Mar 1999, Ben J. Cohen wrote: >> Firstly, is it possible to change the terminal a program is attached to >> while it is running? >> >> For example, if I am running talk, is it possible to move the program from >> ttyp2 to ttyv1 on the same machine (e.g. prior to shutting X down if I >> don't want to lose the connection)? >> >> I don't know how this might be achieved, but I know that if you have a >> program in the background, kill -SIGCONT pid will make it run in the >> foreground (in some sense). >> However, I don't see how to apply this in the case where a program is >> attached to a terminal. > >I don't believe what you want is at easily feasible. A process sent to the >background is still attached to your terminal. What you want to do is set >the STDIN, STDOUT, and STDERR file descriptors to a different terminal. >Unless the program supports the ability to reassign its STD* file >descriptors, I don't think you can do this. That is basically what I want to do. Does the program which is being "moved" have to support the reassignment or is it sufficient to get another program to do it? Is there a program (or can one feasibly be written) which does this? Thanks, Ben. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message