This is the mail archive of the
mailing list for the Cygwin project.
Re: Is this supposed to work this way?
Greetings, Eric Blake!
>>> Is there a reason that something like the following wouldn't work?
>>> if [ -f /bin/cygwin1.dll ]
>> Hm. Turned out, this is more reliable check, than
>> test "$OSTYPE" = "cygwin" && ...
>> But, oh, so much for consistency...
>> Question to Cygwin staff: shouldn't $OSTYPE be declared for Cygwin programs,
>> even if they are not started from Cygwin shell? Is this at all possible?
> No, not possible - $OSTYPE is not standardized, so there's no point in
> expecting cygwin to provide it (of course, you can export it in your
> ~/.bashrc). Furthermore, even if cygwin exported it, the moment your
> cygwin process starts a non-cygwin process, that process would also see
> the same setting.
That raises another question: what is the standard way of detecting OS type?
Andrey Repin (email@example.com) 04.04.2012, <05:34>
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple