From owner-freebsd-questions@FreeBSD.ORG Tue Jul 13 06:28:11 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88FF216A4CE for ; Tue, 13 Jul 2004 06:28:11 +0000 (GMT) Received: from smtp.prodigy.net.mx (nlpproxy01.prodigy.net.mx [148.235.52.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A05343D2D for ; Tue, 13 Jul 2004 06:28:11 +0000 (GMT) (envelope-from mfcardenas@prodigy.net.mx) Received: from smtp.prodigy.net.mx (nlpproxy01 [148.235.52.21]) by smtp.prodigy.net.mx (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0I0S00LQS1YUTC@smtp.prodigy.net.mx>; Tue, 13 Jul 2004 01:28:07 -0500 (CDT) Received: from dup-200-64-114-199.prodigy.net.mx (du-200-64-114-199.prodigy.net.mx [200.64.114.199])(built Sep 8 2003)) with ESMTP id <0I0S009SU1YS7P@smtp.prodigy.net.mx>; Tue, 13 Jul 2004 01:28:06 -0500 (CDT) Date: Tue, 13 Jul 2004 01:33:41 -0500 From: Miguel Cardenas To: freebsd-questions@freebsd.org Message-id: <200407130133.41534.mfcardenas@prodigy.net.mx> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-disposition: inline User-Agent: KMail/1.5.4 X-imss-version: 2.5 X-imss-result: Passed X-imss-scores: Clean:99.90000 C:21 M:2 S:5 R:5 X-imss-settings: Baseline:3 C:2 M:2 S:2 R:2 (0.5000 1.0000) Subject: getenv() fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mfcardenas@prodigy.net.mx List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 06:28:11 -0000 Hello... I have a problem getting the hostname from the HOSTNAME var... #include ... char* host = getenv("HOSTNAME"); returns always NULL... why? if I do 'echo $HOSTNAME' it is visible, but inside my C program returns NULL... what is wrong? is it a bug? Thanx...