X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0	tests=AWL,BAYES_00,TW_TV,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-Spam-Score: -101.014
Message-ID: <4BECDC44.8020101@sh.cvut.cz>
Date: Fri, 14 May 2010 07:14:44 +0200
From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= <v.haisman@sh.cvut.cz>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: vfork always fail problem
References: <AANLkTik_jo0N1YtUTFLzsqAsv5OkkyjCG9epeMq55bWk@mail.gmail.com>
In-Reply-To: <AANLkTik_jo0N1YtUTFLzsqAsv5OkkyjCG9epeMq55bWk@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Huang Bambo wrote, On 14.5.2010 6:29:
> [Bambo@bambo-notebook 4.4.4]$ cat tvfork.c
> #include <sys/types.h>
> #include <unistd.h>
> #include <stdio.h>
> 
> 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@bambo-notebook 4.4.4]$ make tvfork
> cc     tvfork.c   -o tvfork
> [Bambo@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@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
> 

--
VH

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

