Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: Cygwin List Message-Id: <6.0.1.1.0.20040109113640.037e4d28@127.0.0.1> X-Sender: Date: Fri, 09 Jan 2004 11:38:26 -0500 To: Antonio Querubin , cygwin AT cygwin DOT com From: Larry Hall Subject: Re: detecting runtime environment In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 05:26 AM 1/9/2004, Antonio Querubin you wrote: >I want a program (written in C) to behave a little differently depending >on whether it's started in a cygwin window or started from a DOS/Windows >command prompt window. Is there a standard method for detecting, at >run-time, which environment a program was started in? Standard? No. Probably relying on environment variables is the most common approach to something like this. You could look for "SHELL" for example. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/