From owner-freebsd-current Sat Apr 21 15:45:38 2001 Delivered-To: freebsd-current@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id 7A43D37B423 for ; Sat, 21 Apr 2001 15:45:33 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.3/8.11.3) with ESMTP id f3LMkMb80566; Sat, 21 Apr 2001 23:46:22 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f3LMj9550349; Sat, 21 Apr 2001 23:45:09 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200104212245.f3LMj9550349@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Dima Dorfman Cc: Brian Somers , Jordan Hubbard , freebsd-current@FreeBSD.ORG, olli@secnetix.de, brian@Awfulhak.org Subject: Re: cp -d dir patch for review (or 'xargs'?) In-Reply-To: Message from Dima Dorfman of "Sat, 21 Apr 2001 15:11:04 PDT." <20010421221104.65A033E09@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 21 Apr 2001 23:45:09 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Brian Somers writes: > > I looked at your patches and immediately thought ``these patches > > can't be right'' as I was expecting it to deal with things such as > > > > xargs -I [] echo args are [], duplicated are [] > > It deals with it. It conveniently ignores the second '[]' :-). > Seriosly though, what do you expect it to do in this case? It can > either read some more from stdin, or use the same input it used for > the first case of '[]'. I also can't think of a case when either one > of these would be useful. I can't think of a case either :*] > I guess the only reason we would want this is if SUSv2 defines it, but > even that may not matter since we probably won't support the silly > '-i[nospace]' semantic (other than being silly, I can't think of how > to implement it without writing a custom getopt() facility). Absolutely - we wanna avoid that sort of mucking about. > > I'm also dubious about the patches working for large volumes on > > standard input. At this point I scrapped the email I was composing > > 'cos I didn't have time to look into it further :-/ > > > > I think it's important to test any patches with a large number of > > large path names as input - so that ARG_MAX is reached before the > > 5000 argument limit and we can see that we don't end up getting E2BIG > > because of an accidental overflow/miscalculation. > > Any advice on testing this (you did write rev. 1.9 of xargs.1, after > all)? I created a file with 4500 words like this: > > /this/is/a/very/long/path/name/because/I/am/testing/some/posix/limit/10 > > which ended up being 330 kB. It ran the `utility' multiple times like > I expected it to. That said, I don't know what kind of failure mode > to expect. I.e., if the patch is wrong, should it have failed with > something like, "xargs: exec: argument list too long", or would it > just produce incorrect output (which I didn't really check for)? Yes, I was expecting it to fail with E2BIG. Sorry for doubting your patches - they work as advertised from the looks of it ! Nice one. > Thanks, Thank you ! > Dima Dorfman > dima@unixfreak.org -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message