Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Ocamlex/ocamlyacc breakage?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-04-09 (00:16)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Ocamlex/ocamlyacc breakage?
From: Stalkern 2 <>
> If I just start a bunch of readers, 
> 	GTK and stdout freeze;  
> if I have Unix.fork parents wait for Unix.fork reading children, 
> 	readers show that they can't read everything to the end but stop at random 
> points, 
> 	and only GTK drawing areas connected to expose events freeze. 

IIRC, you must be careful when using Unix.fork in a gtk program,
because the child thread will attempt to close the X connection on exit,
except if you use exec to start another command.

The natural way to do it is indeed to start independent threads for
readers. Glib.Io.add_watch is another option, if you just intend to
wait for input without blocking computations.

Jacques Garrigue

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: