* fork - Is there a problem:
@ 1997-08-26 11:26 Soumen Biswas
0 siblings, 0 replies; only message in thread
From: Soumen Biswas @ 1997-08-26 11:26 UTC (permalink / raw)
To: gnu-win32
Hi ,
I am new to gnu-win32 . I have the following prob:
while forking ( ver - b18 .)
/* Example Code*/
int main()
{
int x;
if( !fork() )
printf("Child\n" );
else
printf("Parent\n");
/* If wait is commented out the program shows errors*/
wait( &x ) ;
return x ;
}
The the above code works fine BUT IF wait() is commented out the program
becomes unpredictable ( sometimes it works ... sometimes
shows EXCEPTION TRAPPED ... I think it depends on which process finishes
first - chid || parent .
Is the above behaviour a bug or is
this the way fork() is supposed to work in cygwin
Is there a workaround ?????
thanx
Soumen
sbiswas@novell.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-08-26 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-26 11:26 fork - Is there a problem: Soumen Biswas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).