Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <398FD5CC.38E3715C@ision.net>
Date: Tue, 08 Aug 2000 11:41:32 +0200
From: Benjamin Riefenstahl <Benjamin.Riefenstahl@ision.net>
Organization: ISION Internet AG
X-Mailer: Mozilla 4.05 [en] (Win16; I)
MIME-Version: 1.0
To: cygwin@sourceware.cygnus.com
Subject: Re: System call
References: <F68EqPeQ1qV94h4Jzgi0000240a@hotmail.com> <200008071421.KAA02793@envy.delorie.com> <20000807161543.G12330@cygnus.com> <398F32A3.12530BE4@veritas.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Bob,


Bob McGowan wrote:
> /* `dir', `vdir' and `ls' directory listing programs for GNU.
>    Copyright (C) 85, 88, 90, 91, 95, 1996 Free Software Foundation, Inc.
> [...]
> Perhaps this is the source of some of the confusion?

Part of it probably.  Another is the definition of the system() function
most likely.

It's supposed to call the system shell for processing of it's argument. 
Now for Cygwin this would be "/bin/sh -c", naturally.  For VC++,
Borland, Metrowerks or any other straight Windows compiler the system
shell should be "%COMSPEC% /c".  So for any newby coming from a Windows
background and trying Cygwin, it's kind of mysterious at first, why
system("dir") works in VC++, and not in Cygwin.

Basically, the system() functions is highly specific to the compiler and
environment.  This goes so far that some Macintosh compilers implement
it with a simple "return NULL;", with the reasoning that there *is* no
shell on MacOS to call.


so long, benny
-- 
ISION Internet AG
Benjamin Riefenstahl
mailto:benjamin.riefenstahl@ision.net

Ruhrstrasse 61
D-22761 Hamburg
http://www.ision.net

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

