From owner-freebsd-bugs@FreeBSD.ORG Tue May 1 13:50:03 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7EBA16A401 for ; Tue, 1 May 2007 13:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 826F713C483 for ; Tue, 1 May 2007 13:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l41Do3Vw019841 for ; Tue, 1 May 2007 13:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l41Do3TE019839; Tue, 1 May 2007 13:50:03 GMT (envelope-from gnats) Resent-Date: Tue, 1 May 2007 13:50:03 GMT Resent-Message-Id: <200705011350.l41Do3TE019839@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, Colin Petrie Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F011716A401 for ; Tue, 1 May 2007 13:48:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id E26D313C480 for ; Tue, 1 May 2007 13:48:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l41Dmn6x031283 for ; Tue, 1 May 2007 13:48:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l41DhmfE020416; Tue, 1 May 2007 13:43:48 GMT (envelope-from nobody) Message-Id: <200705011343.l41DhmfE020416@www.freebsd.org> Date: Tue, 1 May 2007 13:43:48 GMT From: Colin Petrie To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: bin/112303: 'route get' returns wrong exit code if no match 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: Tue, 01 May 2007 13:50:03 -0000 >Number: 112303 >Category: bin >Synopsis: 'route get' returns wrong exit code if no match >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 01 13:50:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Colin Petrie >Release: 6.2-RELEASE >Organization: >Environment: FreeBSD xxx.xxx.xxx 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Mon Mar 26 18:27:24 BST 2007 root@xxx.xxx.xxx:/usr/src/sys/i386/compile/CUSTOM i386 >Description: When using 'route get' to display the routing table entry for an IP address, if there is no matching table entry, the command outputs an error to STDERR, but exits with a exit code of 0. Given that the message is output to STDERR, this would suggest that the route command considers this to be an error, therefore should it not exit with a non-zero exit code? >How-To-Repeat: # route get www.google.com route to: lm-in-f147.google.com destination: 66.102.8.0 mask: 255.255.254.0 gateway: tr1 interface: vlan401 flags: recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire 0 0 0 0 0 0 1500 0 # echo $? 0 # route get 192.168.1.1 route: writing to routing socket: No such process # echo $? 0 >Fix: >Release-Note: >Audit-Trail: >Unformatted: