From owner-freebsd-arch@FreeBSD.ORG Sun Jun 25 01:17:44 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC13916A492 for ; Sun, 25 Jun 2006 01:17:44 +0000 (UTC) (envelope-from andrew@areilly.bpc-users.org) Received: from omta04ps.mx.bigpond.com (omta04ps.mx.bigpond.com [144.140.83.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AF9D43D45 for ; Sun, 25 Jun 2006 01:17:43 +0000 (GMT) (envelope-from andrew@areilly.bpc-users.org) Received: from areilly.bpc-users.org ([141.168.7.22]) by omta04ps.mx.bigpond.com with ESMTP id <20060625011742.LGJK22738.omta04ps.mx.bigpond.com@areilly.bpc-users.org> for ; Sun, 25 Jun 2006 01:17:42 +0000 Received: (qmail 81377 invoked by uid 501); 25 Jun 2006 01:17:46 -0000 Date: Sun, 25 Jun 2006 11:17:46 +1000 From: Andrew Reilly To: freebsd-arch@freebsd.org Message-ID: <20060625011746.GC81052@duncan.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: What's up with our stdout? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 01:17:44 -0000 Hi all, My main "workstation" systems are both FreeBSD-STABLE, one an i386 box (pentium3) and the other an amd64 (Athlon64-X2). My diskless/experimental boxes mostly run NetBSD, and I'm currently working my way up to trying different things, so I've been trying to cross-compile NetBSD from my FreeBSD boxes, but running into some problems that prevent it all from working. (They're typically too puny to do native builds comfortably, but that's how I've been running so-far.) One interesting problem that I found yesterday was that NetBSD have added a "-l" option to cat, which is supposed to apply an exclusive advisory lock with fcntl to the the output file, and wait until that succeeds: http://netbsd.gw.com/cgi-bin/man-cgi?cat++NetBSD-current That seems like a pretty useful idea, because it means that you can have parallel make jobs all contributing to a log file or the like (with cat -l >> foo.log), without getting in eachothers' way. However it doesn't work on FreeBSD. The nbcat that the NetBSD cross build process makes stops with "nbcat: stdout: Operation not supported". OK, that's easy to work around, just remove the -l option from the $(TOOL_CAT) calls in the NetBSD makefiles, and only run one job... The question is: what's wrong with our shell or stdout that a program (nbcat in this case) can't fcntl-lock the file opened for output? Is this related to the /dev/stdout@ -> fd/1 files that we have? Seems like a shortcoming to me... Cheers, -- Andrew