From owner-cvs-all Mon Mar 24 11: 9: 6 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21B2C37B401 for ; Mon, 24 Mar 2003 11:09:01 -0800 (PST) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3514443FAF for ; Mon, 24 Mar 2003 11:08:58 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 19029 invoked from network); 24 Mar 2003 19:09:03 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 24 Mar 2003 19:09:03 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h2OJ8tOv093086; Mon, 24 Mar 2003 14:08:55 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030324120316.A13965@FreeBSD.org> Date: Mon, 24 Mar 2003 14:08:55 -0500 (EST) From: John Baldwin To: Juli Mallett Subject: Re: cvs commit: src/usr.bin/xargs xargs.1 xargs.c Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, Maxime Henrion X-Spam-Status: No, hits=-19.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 24-Mar-2003 Juli Mallett wrote: > * De: John Baldwin [ Data: 2003-03-24 ] > [ Subjecte: RE: cvs commit: src/usr.bin/xargs xargs.1 xargs.c ] >> >> On 23-Mar-2003 Maxime Henrion wrote: >> > mux 2003/03/23 10:29:52 PST >> > >> > FreeBSD src repository >> > >> > Modified files: >> > usr.bin/xargs xargs.1 xargs.c >> > Log: >> > Add a new -o option to tell xargs(1) to reopen /dev/tty as stdin in >> > the child process, before executing the command. This is very useful >> > when you do stuff like ``find ... | xargs interactive_application''. >> > Without -o, the application would inherit the pipe as its stdin, and >> > you thus lose any control over it. >> > >> > This flag has been carefully chosen to not conflit with other options >> > of other xargs utilities like GNU xargs. >> > >> > Reviewed by: jmallett >> >> Why not a more generic option that allows you to specify a file to use >> for stdin of children? i.e. xargs -o /dev/stdin or xargs -o /dev/fd/6 >> or something. Also, xargs should probably be fixed to use /dev/null >> by default so that child processes can't read stuff from the pipe. > > IMHO, this should have been called -t (but that's taken) for "pass TTY > to child process" - it's a very specific sort of work-around one needs > to do for some things. Talking about /dev/tty opens it up too much for > bikeshedding, unfortunately. There is one related general option I am > interested in, and which I will try to add to FreeBSD at some time in the > near future, and that is the option to read the *input* from a file, > leaving things unobstructed. I use xargs for mp3 playing a lot, so that's > where both things come in use for me. You missed my point. Why does the option _have_ to have /dev/tty hardcoded, what does it hurt to have it take a filename instead? You can always specify /dev/tty as the filename, but allowing for a filename makes the option more generic and less of a one-time hack. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message