From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 4 08:10:02 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EFC1E84 for ; Tue, 4 Mar 2014 08:10:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F0956F52 for ; Tue, 4 Mar 2014 08:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s248A1EK029271 for ; Tue, 4 Mar 2014 08:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s248A1HP029270; Tue, 4 Mar 2014 08:10:01 GMT (envelope-from gnats) Date: Tue, 4 Mar 2014 08:10:01 GMT Message-Id: <201403040810.s248A1HP029270@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org Cc: From: Ruslan Makhmatkhanov Subject: Re: ports/187240: sysutils/tcplist incompatible with sysutils/lsof X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Ruslan Makhmatkhanov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2014 08:10:02 -0000 The following reply was made to PR ports/187240; it has been noted by GNATS. From: Ruslan Makhmatkhanov To: C Hutchinson Cc: bug-followup@FreeBSD.org Subject: Re: ports/187240: sysutils/tcplist incompatible with sysutils/lsof Date: Tue, 04 Mar 2014 12:00:15 +0400 This is a multi-part message in MIME format. --------------060704030206060703030302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit So, this is proper lsof commandline. It outputs like: uid x.x.x.x:10859->y.y.y.y:22 uid x.x.x.x:16573->y.y.y.y:80 uid x.x.x.x:19337->y.y.y.y:80 and tcplist now fails with: select: Bad file descriptor Looks like the code needs to be updated to modern network stuff. -- Regards, Ruslan T.O.S. Of Reality --------------060704030206060703030302 Content-Type: text/x-patch; name="tcplist.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tcplist.diff" Index: files/patch-03 =================================================================== --- files/patch-03 (revision 346995) +++ files/patch-03 (working copy) @@ -5,7 +5,7 @@ #else /* !OLDLSOF */ /* These use the current (as of 3.62W, at least) parameters for lsof */ -#define LSOFCMD "lsof -nPsli TCP | awk '{print $3,$NF}' | sort | uniq" -+#define LSOFCMD "lsof -nPsli TCP | awk '{print $3,$(NF - 1)}' | sort | uniq" ++#define LSOFCMD "lsof -nPls -iTCP | awk '{print $3,$(NF - 1)}' | tail -n+2 | sort | uniq" #endif /* !OLDLSOF */ #endif /* LSOFCMD */ --------------060704030206060703030302--