From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA15763; Tue, 8 Apr 2003 17:59:02 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA15844 for ; Tue, 8 Apr 2003 17:59:01 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from smtp12.cp.tin.it ([212.216.176.206]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h38FwxX24212 for ; Tue, 8 Apr 2003 17:58:59 +0200 (MET DST) Received: from host228-41.pool212171.interbusiness.it (212.171.41.228) by smtp12.cp.tin.it (6.7.016) id 3E8423B10033E88F for caml-list@inria.fr; Tue, 8 Apr 2003 17:58:57 +0200 From: Stalkern 2 Reply-To: stalkern2@tin.it To: caml-list@inria.fr Subject: Re: [Caml-list] Ocamlex/ocamlyacc breakage? Date: Tue, 8 Apr 2003 18:08:48 +0200 User-Agent: KMail/1.5.1 References: <200304081239.13990.stalkern@tiscalinet.it> In-Reply-To: <200304081239.13990.stalkern@tiscalinet.it> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304081808.48574.stalkern2@tin.it> X-Spam: no; 0.00; stalkern:01 caml-list:01 fork:01 ernesto:01 parses:01 crashes:01 strace:01 lockf:01 threads:01 posix:01 bug:01 faq:01 beginner's:01 beginners:01 bin:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk How is it possible that different instances of a ocamlyacc parser applied to a complete, closed file spoil each other's reading, but _when I fork the process and have the parent Unix.wait for the child_ everything gets OK?? The only solution springing to my mind is that ocamlyacc is not quite reentrant! What should I do then? ;-O Ernesto Il Tuesday 08 April 2003 13:02, Stalkern 2 ha scritto: > Hello to everybody > > I've connected a ocamlex/ocamlyacc parser to a graphical button; this > parser parses a file. > > When I click on the button repeatedly and fast several times, the parser > starts but it crashes. Failures happen at unrelated, apparently random > positions, and strace shows unrelated, apparently random (in the range of > open files) Unix.select errors before the parse_error. > > I have put Unix.lockf locks, but readers are not exclusive. So I thought to > skip the whole reparsing in case a reading lock is already there, but the > F_TEST (*Test a region for other process locks*) command is documented for > use in Unix.lockf : file_descr -> lock_command -> int -> unit, that returns > unit, so how could a TEST ever be possible? > > Any hint? BTW the whole is in a program with threads and runs in a ocaml > compiled with posix threads, but this part does not use threads. > > Thank you in advance for any advice > > Ernesto > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: > http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ Beginner's list: > http://groups.yahoo.com/group/ocaml_beginners ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners