Date: Mon, 24 Mar 2003 14:08:55 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Juli Mallett <jmallett@FreeBSD.org> Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, Maxime Henrion <mux@FreeBSD.org> Subject: Re: cvs commit: src/usr.bin/xargs xargs.1 xargs.c Message-ID: <XFMail.20030324140855.jhb@FreeBSD.org> In-Reply-To: <20030324120316.A13965@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24-Mar-2003 Juli Mallett wrote: > * De: John Baldwin <jhb@FreeBSD.org> [ 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 <jhb@FreeBSD.org> <>< 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-src" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030324140855.jhb>