Newsgroups: comp.unix.msdos Path: utzoo!telly!problem!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Re: VPIX compatability questions Message-ID: <1991Jan24.054250.3169@druid.uucp> Organization: D'Arcy Cain Consulting, West Hill, Ontario References: <6025@spdcc.SPDCC.COM> <1991Jan17.041520.24159@tmsoft.uucp> <2546@westmark.WESTMARK.COM> Date: Thu, 24 Jan 91 05:42:50 GMT In article <2546@westmark.WESTMARK.COM> Dave Levenson writes: >In article <1991Jan17.041520.24159@tmsoft.uucp>, mshiels@tmsoft.uucp (Michael A. Shiels) writes: >> Is there a way to detect you are running inside of VPix? >You could try to write to a file in the root filesystem. >You'll be allowed if you're in real MS-DOS, and not if you're under >VP/ix, unless VP/ix was invoked by root. Nope. That would apply to networks as well. Besides, I can write to drive C: under VP/ix. It maps to a file that I own. >Anybody know a better way? Hmmm. I see two possibilities here. If you have source and are trying to add in the capability why not simply port to Unix. I only run VP/ix when I have a DOS binary that I have to run. If I have source I simply run it under Unix which is a big performance gain. However if you must run under VP/ix then why not set an environment variable? Then all you have to do is test it in your program. Alternatively you can check the PATH variable for an instance of "VPIX" but this isn't a perfect test. Above justified paragraph purely coincidental BTW. :-) -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | There's no government West Hill, Ontario, Canada | like no government! +1 416 281 6094 |