From owner-freebsd-questions@FreeBSD.ORG Wed Jan 17 19:41:53 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9B5B16A415 for ; Wed, 17 Jan 2007 19:41:53 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id 9667813C441 for ; Wed, 17 Jan 2007 19:41:53 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l0HJfrQf013351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Jan 2007 11:41:53 -0800 X-Auth-Received: from [128.208.7.63] (pinocchio.dyn.cs.washington.edu [128.208.7.63]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l0HJfqWY002150 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 17 Jan 2007 11:41:52 -0800 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: References: X-Gpgmail-State: !signed Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2D69192B-8366-4827-8168-B47833DF1322@u.washington.edu> Content-Transfer-Encoding: 7bit From: Garrett Cooper Date: Wed, 17 Jan 2007 11:41:53 -0800 To: FreeBSD Questions X-Mailer: Apple Mail (2.752.2) X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.17.112932 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Subject: Re: Launching a telnet session from a process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 19:41:53 -0000 On Jan 17, 2007, at 10:49 AM, Michael P. Soulier wrote: > On 1/17/07, Kailas Ramasamy wrote: >> Hi, >> How do I launch a telnet session from a process and tell that >> session to >> use console port (/dev/console) for stdin and stdout?. Appreciate >> your help. >> >> I read through fork() and exec() man pages but it is not mentioned >> there. > > Personally I'd use expect around the telnet, and then send the output > to any file desired. > > Mike > -- > Michael P. Soulier > "Any intelligent fool can make things bigger and more complex... It > takes a > touch of genius - and a lot of courage to move in the opposite > direction." > --Albert Einstein What about "telnet < /dev/console &1> /dev/console"? See: . -Garrett