From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28828 invoked by alias); 31 Aug 2012 17:59:55 -0000 Received: (qmail 28818 invoked by uid 22791); 31 Aug 2012 17:59:53 -0000 X-SWARE-Spam-Status: No, hits=3.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ie0-f171.google.com (HELO mail-ie0-f171.google.com) (209.85.223.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 31 Aug 2012 17:59:28 +0000 Received: by ieje14 with SMTP id e14so2007825iej.2 for ; Fri, 31 Aug 2012 10:59:28 -0700 (PDT) Received: by 10.42.180.201 with SMTP id bv9mr9599290icb.43.1346435968276; Fri, 31 Aug 2012 10:59:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.51.196 with HTTP; Fri, 31 Aug 2012 10:59:07 -0700 (PDT) In-Reply-To: References: From: Terris Linenbach Date: Fri, 31 Aug 2012 19:12:00 -0000 Message-ID: Subject: Fwd: Options for getting mandatory locking in cygwin1.dll (was: Promote sqlite 3.7.13-1 from test status?) To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-08/txt/msg00674.txt.bz2 Here is a scenario that involves Cygwin Perl only. I have a need for multiple Cygwin instances on the same box mainly due to DLL bases and CPAN modules. I've already read through the endless threads about both topics so there's no need to mention them. I have good reasons to do what I'm doing. Advisory locks don't work across cygwin instances. This is reasonable but unexpected. That's not such a big deal - use the pidfile pattern instead, until you realize that kill doesn't work across cygwin instances either, so you can't check whether the process that owns the lock is alive. So we are dealing with the possibility of zombie locks, as well as being extra careful to avoid killing processes. Which, of course, is impossible in practice. It would be fantastic if there was eventually a way to get advisory locks to work across cygwin installations. Mandatory locks would work too. Or perhaps I should try Perl's own flock implementation. Any feedback would be gratefully appreciated. Terris > > Greetings, Corinna Vinschen! > > > A "mand" mount option sounds like a really interesting idea, together > > with the special group permission settings as described in the Linux > > fcntl(2) man page. Maybe we can even relax that by making the "mand" > > option the default setting, so the correct file permissions would be > > the only requirement by default. Ok, this also requires to use a > > filesystem with real file permissions, so FAT or "noacl" mounted > > filesystems are out of th question, but I can live with that just fine. > > Sorry byt I can't live with it. > Setting "noacl" mounts aside from "mand" will force me to choose one or > another. And it wouldn't be a choice in Cygwin's favor. > Forced use of POSIX'ised permissions have higher probability of breaking > existing Windows applications, than using POSIX "suggestive" locks instead of > appropriate strict locks could harm Cygwin applications. > > > The problem with this approach is a non-technical one: In the next > > couple of months I have probably no time to implement it. It's not > > overly tricky to implement it, as far as I can see, but, as usual, > > somebody has to do it. So if anybody would like to take a stab at > > it... > > > -- > WBR, > Andrey Repin (anrdae...@freemail.ru) 17.08.2012, <17:01> -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple