Mail Archives: cygwin/1997/01/22/17:07:48
I think there is some problems with cygwin32.dll when returning from
child process that is not wait'ed. To get around this problem, try the
following change to your program (I don't have access to gnu-win32 from
where I send my mail, so I cannot try this out myself.)
if (pid > 0) {
int status;
wait(&status);
printf("Father\n");
}
Jorge Fernandez Suarez wrote:
>
> Hello, I'm newbie with this compiler, always work with djgpp for DOS,
> but
> after take a look to the gnu-win32 compiler, I have decided to start
> with
> it, I've install it and try this little program:
>
> # include <stdio.h>
> # include <conio.h>
> # include <unistd.h>
>
> void main() {
> int pid;
> printf("Hello gnu-win32\n");
>
> pid= fork();
>
> if( pid>0 ) printf("Father\n");
> else if( !pid ) printf("Son\n");
> else printf("Error\n");
>
> getch();
> }
>
> ... and It fails at the fork sentence...
> I think that maybe I've not do a good installation on my computer (I'm
> newbie to the unix too)
>
> well... I tell you how i do it to compile the program... i think it's
> strange...
>
> I load the 'bash.exe' file
> I write "gcc a.cc"
> I exit from 'bash'
> I run 'a.exe'
>
> żAny ideas? ... the faq I got don't explain the use of the compiler...
> r:-?
>
> thanx
> Jorge
> -
> For help on using this list, send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -