Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3C5584A4.8090904@netcom.es>
Date: Mon, 28 Jan 2002 17:04:36 +0000
From: GRI <gri@netcom.es>
Organization: GRI
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: es-es
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: execl  problem!!!
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi:

Please look this code from a1.exe program and a2.exe program:

//a1.cpp

#include <process.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    execl("a2.exe","",NULL);
    return 0;
}

#include <stdio.h>
#include <conio.h>

//a2.cpp

int main()
{
    char c1;

    while(c1!='c')
        c1=getchar();
        printf("%c\n",c1);
    }
    return 0;
}


I have a execl problem when I call a2.exe from a1.exe.
I have compiled both with -mon-cygwin flag. Trapped chars by a2.exe are 
returned to shell . Why???

If  I  run this under bash or sh (or I compile without -mon-cygwin 
flag)  this behavior does not occur.

Could someone please explain me???

Thanks in advance.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

