From owner-freebsd-ports Fri Mar 29 16:35:54 2002 Delivered-To: freebsd-ports@freebsd.org Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.103.10]) by hub.freebsd.org (Postfix) with ESMTP id CF37237B405 for ; Fri, 29 Mar 2002 16:35:51 -0800 (PST) Received: (from mph@localhost) by wopr.caltech.edu (8.11.6/8.9.3) id g2U0Zkd81586; Fri, 29 Mar 2002 16:35:46 -0800 (PST) (envelope-from mph) Date: Fri, 29 Mar 2002 16:35:46 -0800 From: Matthew Hunt To: Kris Kennaway Cc: esoha@attbi.com, ports@freebsd.org Subject: Re: Bento errorlogs and /dev/fd/* Message-ID: <20020329163546.A81336@wopr.caltech.edu> References: <20020330002019.YFXS2928.rwcrmhc53.attbi.com@rwcrwbc55> <20020329162447.A81231@wopr.caltech.edu> <20020329162707.A56793@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020329162707.A56793@xor.obsecurity.org>; from kris@obsecurity.org on Fri, Mar 29, 2002 at 04:27:07PM -0800 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi Kris, On Fri, Mar 29, 2002 at 04:27:07PM -0800, Kris Kennaway wrote: > > This has to be an input to the program. And book-building is already > > on stdin, so we need another input. > > Looks like we're missing some context on this discussion. OK, I thought I provided a pretty thorough explanation in my original email, but I will try again. We want crafty to analyse all of the games in an enormous file, in order to produce an "opening book" which is much smaller than the enormous file. We have the enormous file in zipped form. We could unzip it, but it would take up a great deal of space (300+ MB) which would be inconvenient for the user, and shouldn't really be necessary. In order to instruct crafty to build an opening book, we need to give it a command on stdin, specifying the name of the enormous file and a couple of other parameters. This precludes us from supplying the enormous file on stdin. My solution has been to use the shell's redirection syntax to gzcat the zipped enormous file into crafty's file descriptior #3. Then, in the command we give crafty, tell it that the enormous input file is "/dev/fd/3". This works extremely well, except that "/dev/fd/3" does not exist in the chroot'ed package building environment. I proposed several possible solutions in my original email, and welcome opinions as to which are the best. Matt -- Matthew Hunt * Inertia is a property http://www.pobox.com/~mph/ * of matter. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message