X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_TV X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Fri, 14 May 2010 12:29:48 +0800 Message-ID: Subject: vfork always fail problem From: Huang Bambo To: The Cygwin Mailing List Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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 [Bambo AT bambo-notebook 4.4.4]$ cat tvfork.c #include #include #include int main(void) { pid_t pid = vfork(); if ( pid > 0 ) { printf("I'm chield.\n"); _exit(0); } else if ( pid == 0 ) { printf("I'm parent"); } else { perror("vfork failed."); } } [Bambo AT bambo-notebook 4.4.4]$ make tvfork cc tvfork.c -o tvfork [Bambo AT bambo-notebook 4.4.4]$ ./tvfork.exe 4 [main] tvfork 4136 fork: child -1 - CreateProcessW failed, errno 2 vfork failed.: No such file or directory [Bambo AT bambo-notebook 4.4.4]$ ./tvfork 3 [main] tvfork 2956 fork: child -1 - CreateProcessW failed, errno 2 vfork failed.: No such file or directory I think maybe the wrong parameters were sent while calling CreateProcessW. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple