delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/09/11:42:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <cygwin AT cygwin DOT com>
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 <tony AT lava DOT net>, cygwin AT cygwin DOT com
From: Larry Hall <cygwin-lh AT cygwin DOT com>
Subject: Re: detecting runtime environment
In-Reply-To: <Pine.CYG.4.58.0401090019340.352@tempura>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0401090019340 DOT 352 AT tempura>
Mime-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019