From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 1 03:50:02 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56D6016A41A for ; Thu, 1 Nov 2007 03:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2099613C4B6 for ; Thu, 1 Nov 2007 03:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lA13o1j7076978 for ; Thu, 1 Nov 2007 03:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lA13o1HO076977; Thu, 1 Nov 2007 03:50:01 GMT (envelope-from gnats) Resent-Date: Thu, 1 Nov 2007 03:50:01 GMT Resent-Message-Id: <200711010350.lA13o1HO076977@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F56E16A47D for ; Thu, 1 Nov 2007 03:46:29 +0000 (UTC) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by mx1.freebsd.org (Postfix) with ESMTP id C357613C481 for ; Thu, 1 Nov 2007 03:46:28 +0000 (UTC) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (localhost [127.0.0.1]) by aldan.algebra.com (8.14.1/8.14.1) with ESMTP id lA11peLe048541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 31 Oct 2007 20:51:40 -0500 (EST) (envelope-from mi@aldan.algebra.com) Received: (from mi@localhost) by aldan.algebra.com (8.14.1/8.14.1/Submit) id lA11pcDP048540; Wed, 31 Oct 2007 20:51:38 -0500 (EST) (envelope-from mi) Message-Id: <200711010151.lA11pcDP048540@aldan.algebra.com> Date: Wed, 31 Oct 2007 20:51:38 -0500 (EST) From: "Mikhail T." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/117733: allow to tee(1) to sockets, descriptors [patch] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2007 03:50:02 -0000 >Number: 117733 >Category: bin >Synopsis: allow to tee(1) to sockets, descriptors [patch] >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Nov 01 03:50:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: FreeBSD 6.2-STABLE amd64 >Organization: Virtual Estates, Inc. http://libpipe.virtual-estates.com/ >Environment: System: FreeBSD aldan.algebra.com 6.2-STABLE >Description: The proposed patch would allow tee to be used to send data to TCP or UDP sockets, as well as to the already opened file-descriptors (such as 2) without resorting to hacks like /dev/stderr. There can be any number of these "files" specified, as long as they preceed the regular files on the command line. For example: tee -d 2 -t www.example.com 80 -u localhost 1081 log1.txt log2.txt The patch also modifies the usage() handling to exit with 0, when help was requested (-h), and with EX_USAGE otherwise. >How-To-Repeat: >Fix: See http://aldan.algebra.com/~mi/ntee.diff.html for readable and http://aldan.algebra.com/~mi/ntee.diff for appliable patch. >Release-Note: >Audit-Trail: >Unformatted: