From owner-freebsd-questions@FreeBSD.ORG Fri Apr 17 09:53:25 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A032E1065673 for ; Fri, 17 Apr 2009 09:53:25 +0000 (UTC) (envelope-from utisoft@googlemail.com) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id 0DEA78FC1E for ; Fri, 17 Apr 2009 09:53:24 +0000 (UTC) (envelope-from utisoft@googlemail.com) Received: by ewy19 with SMTP id 19so801932ewy.43 for ; Fri, 17 Apr 2009 02:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=XbaETFbSsY0HvBTUK66FQzDnDG7osANwsvP0Qyl690c=; b=wIgk7q/bWdREm5OAK60quKh/ITQuFGtxbE63hba/YF5qkksqzk68bes2XE1GNBqezs i4iHRwJGiLellREOvs8wfaOnUNTZM3USqrBKG473V7HyhgVmQGyb0263idZVu54xx9wG HeRCGFKefsuTKwBIS2jQEeKuMjcb0Qe+Xtiyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; b=EKH+KLQ7rhn3rRX8ErJ5YZ1emgHagDOqXMJAZNoaEfY/mAVGI9kwiLvBEkSZIfH1sY Yc51xf0tLVI/hZQtCAtWXeRIc2NlMbRZbuBC1QTj5XVHL3NWGWlPbaGSuIWtBU83pW83 X7eXeHZbtcB7I2kaNQGlEvrCuMNfcPxkT0uEQ= MIME-Version: 1.0 Received: by 10.210.109.10 with SMTP id h10mr425839ebc.75.1239962004119; Fri, 17 Apr 2009 02:53:24 -0700 (PDT) In-Reply-To: <20090416191603.GA9220@sushi.pseudo.local> References: <20090416191603.GA9220@sushi.pseudo.local> From: Chris Rees Date: Fri, 17 Apr 2009 10:53:09 +0100 Message-ID: To: Mel Flynn , freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: [tobias.rehbein@web.de: Re: [OT] C programming question: reopen stdin] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 09:53:25 -0000 2009/4/16 Tobias Rehbein : > s/Good/Could/ > > > ---------- Forwarded message ---------- > From:=A0Tobias Rehbein > To:=A0Mel Flynn > Date:=A0Thu, 16 Apr 2009 21:03:52 +0200 > Subject:=A0Re: [OT] C programming question: reopen stdin > Am Tue, Apr 14, 2009 at 09:07:26PM +0200 schrieb Mel Flynn: >> On Tuesday 14 April 2009 20:13:00 Tobias Rehbein wrote: >> >> > I'm having a little trouble solving a specific problem in C. I want to >> > write a filter which reads data from stdin. After reading the user sho= uld >> > be able to interact with the program via stdin. >> >> Just open(2) /dev/tty. If tty is invalid, then you don't have to expect = a user >> either. > > Thanks for this hint. I tried to implement an example. Good someone take = a look > at it and tell me if I did it right. Well, at least it works... > > The code is here: > > =A0 =A0 =A0 =A0http://gist.github.com/95320 > > To avoid further spamming of the freebsd-questions mailing list: Could so= meone > point me to a good place to ask C programming questions? > > Regards > > =A0 =A0 =A0 =A0Tobias > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > http://groups.google.com/group/comp.lang.c The oldest and probably most populated. --=20 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?