From owner-freebsd-ports@FreeBSD.ORG Wed Sep 5 13:06:17 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 4D4C016A420; Wed, 5 Sep 2007 13:06:17 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.freebsd.org (Postfix) with ESMTP id 2738113C45E; Wed, 5 Sep 2007 13:06:17 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141] (may be forged)) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l85D6Eit011340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Sep 2007 06:06:14 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l85D6DqV015332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 5 Sep 2007 06:06:13 -0700 Message-ID: <46DEA9C5.5080009@u.washington.edu> Date: Wed, 05 Sep 2007 06:06:13 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Sergey Matveychuk References: <46DDE90D.8090700@csub.edu> <46DE8DA8.1030506@FreeBSD.org> In-Reply-To: <46DE8DA8.1030506@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.3.310218, Antispam-Engine: 2.5.2.313940, Antispam-Data: 2007.9.5.54324 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __USER_AGENT 0' Cc: Russell Jackson , 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 13:06:17 -0000 Sergey Matveychuk wrote: > 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. > I'm not sure how well ruby's debug mode does compared to perl, or how it works in comparison, but try preceding the portupgrade command with '/usr/local/bin/ruby18 -d', to force portupgrade to run in debug mode. -Garrett