Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <426DBDEE.5080905@awcubed.com>
Date: Tue, 26 Apr 2005 00:05:02 -0400
From: Archie Warnock <warnock@awcubed.com>
Organization: A/WWW Enterprises
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: system() fails on pristine Windows systems
References: <426D5CAB.2070804@awcubed.com> <d4jrnk$hkk$1@sea.gmane.org> <426DB60B.9090004@awcubed.com> <426DBB5D.5660669D@dessent.net>
In-Reply-To: <426DBB5D.5660669D@dessent.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Brian Dessent wrote:
> That is how system() works on every unix platform: "/bin/sh -c %s"

Yep.  Got it.

> You could fork() and exec(), or just call one of the spawn() family of
> functions.  This is all open source you know, you could look and see how
> system() is implemented in winsup/cygwin/syscalls.cc.

I'll have to look and see there.  The fork()/exec()/spawn() functions
don't quite do what I need, though.

> The path is irrelevent because it's called as "/bin/sh -c cmd", and the
> location of /bin is taken from the mount table.  On your systems without

Ummm...  are you saying that I have a Cygwin mount table outside of Cygwin?

> Cygwin installed you could just mount /bin to point to a directory that
> contains sh.exe and it would work.  Though I don't recommend that.  If

Yeah - I thought of that.  But then I have to call mount, but not from
inside the running program (since, obviously, that won't work for the
same reason).  I'll try running it from a batch file on a non-Cygwin
machine.  Thanks for the tip.

> you can avoid not depending on the mount table it will probably make
> your program work better on systems without Cygwin installed.  However,
> that's kind of off topic for this list, as people here don't really care
> about experiences of people that don't have Cygwin installed.

Sorry.  I read on the Cygwin page that this group was the catch-all for
all sorts of Cygwin-related problems, other than the ones specifically
covered by the other lists.  Clearly, this is Cygwin-related.  I thought
I was in the right place.  Apologies for the intrusion - I'm just
looking for answers to my Cygwin problem.

-- 
Archie

-- Archie Warnock                       Internet: warnock@awcubed.com
-- A/WWW Enterprises                    http://www.awcubed.com
--       As a matter of fact, I _do_ speak for my employer.

--
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/

