X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <182dc94a0806020500g2b8211d1w948a117b233c1fb1@mail.gmail.com> Date: Mon, 2 Jun 2008 17:30:16 +0530 From: "Mani kandan" To: cygwin AT cygwin DOT com Subject: Reg : System Command Not Working MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Hi, 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 #include 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; } Pls help. -- 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/