X-Spam-Check-By: sourceware.org Message-ID: <44309988.2030109@cygwin.com> Date: Sun, 02 Apr 2006 23:42:00 -0400 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051223 Fedora/1.5-0.2.fc4.remi Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Spawnvp on pwd.exe and mkdir.exe fails References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Brian Kramer wrote: > I have a simple C++ file I am using to spawn pwd.exe and mkdir.exe. These are > causing stackdumps. Can anyone help me resolve this? ls.exe does not cause a > stackdump. > > The same C++ file compiles using Visual Studio and the output is as expected. > > In particular on Windows: > pid=1996 > /cygdrive/e/tempprojects/pwd/Debug > done > > And under cygwin: > pid=5860 > (pwd.exe.stackdump written) > done > > Here's my program: > > #include > #include > > int main() > { > char* argv[] = {"pwd.exe", 0}; > int pid = spawnvp( _P_NOWAIT, argv[0], argv ); > printf("pid=%d\n",pid); > > int termstat; > cwait( &termstat, pid, WAIT_CHILD ); > printf("done\n"); > > return 0; > } You should include the path to "pwd.exe" (i.e. "/bin/pwd.exe"). If this doesn't solve your problem, I suggest you read and follow the problem reporting guidelines found here: > Problem reports: http://cygwin.com/problems.html FWIW, with the correction I suggested, this works fine for me with Cygwin 1.5.19. -- 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/