delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Mon, 2 Jun 2008 10:40:06 -0400 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Reg : System Command Not Working |
Message-ID: | <20080602144006.GB8881@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <182dc94a0806020500g2b8211d1w948a117b233c1fb1 AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <182dc94a0806020500g2b8211d1w948a117b233c1fb1@mail.gmail.com> |
User-Agent: | Mutt/1.5.16 (2007-06-09) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
On Mon, Jun 02, 2008 at 05:30:16PM +0530, Mani kandan wrote: >We are migrating unix application to windows. We have converted the >Unix samp.sh file to samp.bat for windows. While converting samp.sh >file we have used some unix command in samp.bat file.We have installed >SFU to support those unix command. We are using some cygwin exe >also.We have installed cygwin also. In my application we have one >senario that one cpp file have system command, and we have created exe >with MSVC++. But when i run that exe > >I got the error message that "The system cannot execute the specified >program". Then I have created sample.exe which is having the system >command. If i run the following senario it is working > > (1) Only SFU installed in Windows 2003 server > (2) Only CYGWIN installed in Windows 2003 server > (3) Without SFU and CYGWIN in Windows 2003 server > My doubt is > (i)If Cygwin and SFU was together, that time I can't execute the > system command? Why ? > (ii) With cygwin only ( Without SFU) How we will make a grep > command to execute? > >Here is my sample code > #include <stdio.h> > #include <stdlib.h> > > int main () > { > int i; > printf ("Checking if processor is available..."); > if (system(NULL)) puts ("Ok"); > else exit (1); > printf ("Executing command DIR...\n"); > i=system ("dir"); > printf ("The value returned was: %d.\n",i); > return 0; > } I don't understand why you wouldn't just use samp.sh unchanged from Unix without changing it to a .bat file and use either product the way it was designed without SFU with cygwin binaries or vice versa. But, unless this is just a simple PATH environment variable problem, i'm sorry, but we're really not going to be helping you debug problems with a combination of both Cygwin and SFU. They are competing products and there really is no reason to use them in conjunction with each other. cgf -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |