|more useful options|
Check for root under Cygwinby vsespb (Chaplain)
|on Sep 02, 2013 at 09:57 UTC||Need Help??|
vsespb has asked for the
wisdom of the Perl Monks concerning the following question:
I have unit tests, which check that my code properly handle "permission denied" errors and other IO errors.
My application works only under POSIX systems (i.e. not Win32), and I am thinking now about porting it to CygWin.
Tests look like this (simplified version):
and somefunc() looks like this:
(that is a simplified version too - just for proof of concept)
In the test you can see
That's because otherwise test will fail under root.
That check, however, is not working under Cygwin as expected.
And I am wondering how that code could be fixed under cygwin?
(note that I am aware of several file-system emulator modules, but I decided to stick with real filesystem, for now)