From owner-freebsd-questions@FreeBSD.ORG Tue Feb 12 14:54:34 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 145B3C0A for ; Tue, 12 Feb 2013 14:54:34 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [75.145.138.73]) by mx1.freebsd.org (Postfix) with ESMTP id B17C595B for ; Tue, 12 Feb 2013 14:54:33 +0000 (UTC) Received: from [10.219.130.115] ([66.175.245.1]) (authenticated bits=0) by ozzie.tundraware.com (8.14.6/8.14.6) with ESMTP id r1CEquKX031943 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 12 Feb 2013 08:52:57 -0600 (CST) (envelope-from tundra@tundraware.com) Message-ID: <511A5771.9020208@tundraware.com> Date: Tue, 12 Feb 2013 08:53:37 -0600 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: FreeBSD Mailing List Subject: Was I Sourced? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ozzie.tundraware.com [75.145.138.73]); Tue, 12 Feb 2013 08:52:57 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: r1CEquKX031943 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: tundra@tundraware.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 14:54:34 -0000 Is there a way for script to determine whether is was sourced or forked off as a subprocess when it was invoked? I have a script that needs to be sourced to work properly and I want to warn the luser if they exec or subshell it instead. TIA, -- ----------------------------------------------------------------------- Tim Daneliuk