From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8d4e52001144189,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-09-29 20:38:10 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.berkeley.edu!ucberkeley!freenix!enst!enst.fr!not-for-mail From: "Alexey V. Litvinov" Newsgroups: comp.lang.ada Subject: problem with gnat.lock_files Date: Sat, 30 Sep 2000 13:48:48 +1100 Organization: ENST, France Message-ID: <000001c02a8f$c9667980$b4ab7cc1@new> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Trace: menuisier.enst.fr 970285089 17763 137.194.161.2 (30 Sep 2000 03:38:09 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: 30 Sep 2000 03:38:09 GMT To: "comp lang ada" Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0beta5 Precedence: bulk List-Id: comp.lang.ada mail<->news gateway Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: supernews.google.com comp.lang.ada:891 Date: 2000-09-30T03:38:09+00:00 I have a trouble with GNAT.Lock_Files package. when I try to lock file it constantly raises Lock_Error. I'm sure that this file not opened by other program. And wrote next piece of code to test: with GNAT.Lock_Files; use GNAT.Lock_Files; with Ada.Text_IO; use Ada.Text_IO; procedure Lock is begin put_line("trying to lock..."); Lock_File("c:\test.fl", 1.0, 3); put_line("locked."); UnLock_File("c:\test.fl"); exception when Lock_Error => put_line("Unable to lock!"); when others => raise; end; after every run it gaves "Unable to lock!" what I'm doing wrong?