| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20090312155236.GX9322@calimero.vinschen.de> |
| References: | <9e3fd2c80903120740u5fa06d62t372cd67212fad1e AT mail DOT gmail DOT com> <20090312155236 DOT GX9322 AT calimero DOT vinschen DOT de> |
| Date: | Thu, 12 Mar 2009 17:47:32 +0100 |
| Message-ID: | <9e3fd2c80903120947i438d8990l8e377f3c22daf6bf@mail.gmail.com> |
| Subject: | Re: Problem getting flock with timeout to work |
| From: | Robert Klemme <shortcutter AT googlemail DOT com> |
| To: | cygwin AT cygwin DOT com |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
2009/3/12 Corinna Vinschen <corinna-cygwin AT cygwin DOT com>: > On second thought, maybe I don't understand what you're expecting. > Running the testcase on a Linux box I get this: > > Linux calimero 2.6.[etc] > -rw-r--r-- 1 corinna vinschen 0 Mar 12 16:48 lock > timeout 10 > started 1 > 3644 Thu Mar 12 16:48:48 CET 2009 > started 2 > 3644 Thu Mar 12 16:48:49 CET 2009 > waiting... > 3644 Thu Mar 12 16:48:50 CET 2009 > 3644 Thu Mar 12 16:48:51 CET 2009 > 3644 Thu Mar 12 16:48:52 CET 2009 > 3662 Thu Mar 12 16:48:53 CET 2009 > 3662 Thu Mar 12 16:48:54 CET 2009 > 3662 Thu Mar 12 16:48:55 CET 2009 > 3662 Thu Mar 12 16:48:56 CET 2009 > 3662 Thu Mar 12 16:48:57 CET 2009 > done > > 9 seconds > > I don't see that this is different in the sense of "more correct" than > on Cygwin. Sorry, I overlooked the timeout setting: of course, this is correct. But if you start it with command line argument 1 (i.e. timeout 1 second) the second flock should bail out with an error since it cannot obtain the lock in time. Kind regards robert -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |