This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

execl problem!!!


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]