delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/13/10:32:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS,TW_CG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Side-by-side configuration is incorrect reported as permission denied
Date: Mon, 13 Aug 2012 07:32:11 -0700
Lines: 44
Message-ID: <k0b35b$e99$1@dough.gmane.org>
References: <k045k2$gvk$1 AT dough DOT gmane DOT org> <5025C431 DOT 7050201 AT cygwin DOT com> <CA+7connXxSSkw-fhHvqbVanEvX7YHOVVdLndmqmd07xRvFT49Q AT mail DOT gmail DOT com> <20120812170641 DOT GC32748 AT ednor DOT casa DOT cgf DOT cx> <CA+7conm=AXUX9Xfj67tGRgMbrgC47W9QHuQ2L3V2p_=7Cf81GQ AT mail DOT gmail DOT com> <CA+sc5m=myjskB4zG0HARWHvZMQGz-k=j7jT=q1Gny4XpNgMfCg AT mail DOT gmail DOT com> <k09mg3$52l$1 AT dough DOT gmane DOT org> <20120813082716 DOT GA11198 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0
In-Reply-To: <20120813082716.GA11198@calimero.vinschen.de>
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

On 08/13/2012 01:27 AM, Corinna Vinschen wrote:
> On Aug 12 18:49, Andrew DeFaria wrote:
>> On 08/12/2012 01:35 PM, Earnie Boyd wrote:
>>> On Sun, Aug 12, 2012 at 1:56 PM, Pawel Jasinski wrote:
>>>>> If you can find a nice Linux errno which maps from ERROR_SXS_CANT_GEN_ACTCTX
>>>>> to something other than EACCES I'd be happy to change Cygwin.
>> [...]
>> Now I know that there are POSIX error codes and people tend to check
>> error numbers and you want to put the closest match of a POSIX errno
>> to the Windows error message. But why couldn't you just print to
>> stderr the error message that Windows returned perhaps in addition
>> to setting syserr to "Permission denied"?
> Do you really want that?
I think it would be helpful.
> There's a difference between cmd and Cygwin.  Cmd is a shell, Cygwin is
> just the underlying shared lib providing a generic API.
OK so bash...
> If an error occurs, it's the shell's responsibility to print an error
> message in the first place.  All messages printed by Cygwin are not
> controllable by the calling application.  Therefore we usually only
> print messages from the DLL if something very serious happens from the
> DLLs perspective.  Some arbitrary Windows error code returned from
> CreateProcess is usually not something actually serious.  There was
> just "some" reason that an application couldn't be started.
IMHO "some" reason that the user should be alerted about. How is it 
helpful to the end user to suppress the error message?
> Also, where do you draw the border?  Which windows error code is serious
> enough to justify a (pretty intrusive!) error message from the underlying
> library and which isn't?
I would draw the border at "if there's an error message".
> As cgf pointed out, Windows has zillions of error codes.  We wouldn't
> want to generate the same number of POSIX-like error codes.  It wouldn't
> make a lot of sense since POSIX applications only test for a limited,
> expected number of error codes, and it might break things.
I was talking error *messages* not error *codes*.
> Having said that, EACCES is not bad as far as error codes go in this
> case, but I like Cliff Hones' idea to choose another existing POSIX
> error like ELIBACC, "Can not access a needed shared library", which
> might make more sense in this scenario.  I'd also like ENOPKG, "Package
> not installed".
Again, I was talking error messages not error codes.
-- 
Andrew DeFaria <http://defaria.com>
Why is there only one Monopolies commission?


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019