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 MAA04874; Tue, 8 Apr 2003 12:52:26 +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 MAA04820 for ; Tue, 8 Apr 2003 12:52:24 +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 h38AqNX03445 for ; Tue, 8 Apr 2003 12:52:24 +0200 (MET DST) Received: from host228-41.pool212171.interbusiness.it (212.171.41.228) by smtp12.cp.tin.it (6.7.016) id 3E8423B1003242D0 for caml-list@inria.fr; Tue, 8 Apr 2003 12:52:22 +0200 From: Stalkern 2 To: caml-list@inria.fr Subject: [Caml-list] Ocamlex/ocamlyacc breakage? Date: Tue, 8 Apr 2003 13:02:10 +0200 User-Agent: KMail/1.5.1 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200304081239.13990.stalkern@tiscalinet.it> Reply-To: stalkern2@tin.it Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; stalkern:01 parses:01 crashes:01 strace:01 lockf:01 threads:01 posix:01 ernesto:01 ocaml:01 command:98 int:01 click:97 parser:02 unix:02 unit:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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