From owner-freebsd-ports@FreeBSD.ORG Wed Sep 5 11:06:25 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8494916A421 for ; Wed, 5 Sep 2007 11:06:25 +0000 (UTC) (envelope-from sem@FreeBSD.org) Received: from mail.ciam.ru (ns.ciam.ru [213.247.195.75]) by mx1.freebsd.org (Postfix) with ESMTP id 4208B13C47E for ; Wed, 5 Sep 2007 11:06:25 +0000 (UTC) (envelope-from sem@FreeBSD.org) Received: from dhcp250-210.yandex.ru ([87.250.250.210]) by mail.ciam.ru with esmtpa (Exim 4.x) id 1ISsi9-0008EB-EO; Wed, 05 Sep 2007 15:06:17 +0400 Message-ID: <46DE8DA8.1030506@FreeBSD.org> Date: Wed, 05 Sep 2007 15:06:16 +0400 From: Sergey Matveychuk User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Russell Jackson References: <46DDE90D.8090700@csub.edu> In-Reply-To: <46DDE90D.8090700@csub.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: portupgrade exits immediately when stdin/out closed X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2007 11:06:25 -0000 Russell Jackson wrote: > I'm debugging a problem with portupgrade being used as part of an automated package > handler within puppet (http://puppet.reductivelabs.com). > > The problem is that when the handler executes portupgrade as an external process from > ruby, portupgrade hangs with a script process taking up 100% of the cpu. I suspected that > script isn't designed to be run without a controlling tty. So, I executed portupgrade like > so to test: > > portupgrade --new --batch --yes <&- >&- 2>&- & > > To my surprise, portupgrade exits immediately with a status of 0. I found an old pr > (bin/56166) describing similar behavior. It looks like script was fixed, but portupgrade > still isn't happy. > > This happens with both ports-mgmt/portupgrade and ports-mgmt/portupgrade-devel. > > Suggestions? > portupgrade was fixed to work when tty is not a physical device but file or so. I think you don't want to run portupgade this way really. You have a possibility to brake everything. -- Dixi. Sem.