Side-by-side configuration is incorrect reported as permission denied

Corinna Vinschen
Mon Aug 13 08:48:00 GMT 2012

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?

There's a difference between cmd and Cygwin.  Cmd is a shell, Cygwin is
just the underlying shared lib providing a generic API.

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.

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?

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.

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


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list