From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13674 invoked by alias); 13 Aug 2012 14:43:46 -0000 Received: (qmail 13133 invoked by uid 22791); 13 Aug 2012 14:43:04 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 13 Aug 2012 14:42:50 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 82ADA2C0054; Mon, 13 Aug 2012 16:42:47 +0200 (CEST) Date: Mon, 13 Aug 2012 14:59:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Side-by-side configuration is incorrect reported as permission denied Message-ID: <20120813144247.GH23253@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <5025C431.7050201@cygwin.com> <20120812170641.GC32748@ednor.casa.cgf.cx> <20120813082716.GA11198@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00280.txt.bz2 On Aug 13 07:32, Andrew DeFaria wrote: > 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... Ok so bash what? > >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? Huh? Somehow you swapping cause and effect. There is no "suppressed" error message. Generating an error message is the task of the shell in the first place. It's not that the OS generates an error message and cmd lets it slip through while Cygwin (or bash) "suppress" it. It's the CreateProcess call which generates an error code ERROR_SXS_CANT_GEN_ACTCTX and cmd printing the connected error message, just like bash gets an error code EACCES and prints the connected error message "Permission denied". > >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". Again, cause and effect turned upside down. > >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*. Again, cause and effect turned upside down. > >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. Again, cause and effect turned upside down. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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