www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/02/19/15:00:07.1

From: steve AT dosius DOT zzn DOT com (Dosius)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: call to 'open' causes all sleeping drives to awaken!
Date: 19 Feb 2003 11:47:12 -0800
Organization: http://groups.google.com/
Lines: 51
Message-ID: <9307085f.0302191147.e0320d6@posting.google.com>
References: <b2v0tc02dt0 AT enews4 DOT newsguy DOT com> <QqK4a.51044$jM5 DOT 127842 AT newsfeeds DOT bigpond DOT com>
NNTP-Posting-Host: 204.168.131.19
X-Trace: posting.google.com 1045684032 7992 127.0.0.1 (19 Feb 2003 19:47:12 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 19 Feb 2003 19:47:12 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Ben Peddell" <lightspeed85 AT hotmail DOT com> wrote in message news:<QqK4a.51044$jM5 DOT 127842 AT newsfeeds DOT bigpond DOT com>...
> Sander Pool <sander DOT biteme AT biteme DOT sanders-stuff DOT com> wrote in message
> news:b2v0tc02dt0 AT enews4 DOT newsguy DOT com...
> > Hello,
> >
> > I noticed when I used a program compiled with DJGPP that all sleeping
>  drives
> > in my system spin up. I examined the code and it only uses the 'open' call
> > to create file descriptors. So I wrote a tiny test program:
> >
> > #include <fcntl.h>
> >
> > main()
> > {
> >     int f;
> >     f = open("c:\\temp\\t.txt", O_RDONLY);
> >     return 0;
> > }
> >
> > This compiles fine with gcc test.c. I wait for my drives to spin down and
> > then I run this program. I can hear each drive in turn spin up while the
> > program waits for this to happen.
> 
> Why not find out whether the drives are spinning-up before or after the
> open() is issued, by printing something before the open(), and waiting for
> user input.
> If it is occurring before the open(), then it is probably the stub loader
> searching for CWSDPMI.EXE on the path. If you don't want this to happen,
> then ensure that DPMI is active before running the program.
> 
> 
> >
> > I compiled the same using MinGW and it does not behave this way.
> >
> > Has anyone else noticed this? It's reason enough for me to forgo DJGPP and
> > use MinGW instead.
> >
> >     Sander
> >
> > PS djgpp gcc behaves the same way, it spins up all drives before starting
> > the compile. Of course if the drives are already spinning you won't notice
> > this.
> >
> > PPS Win2K
> >
> >

IIRC, WinNT (and therefore 2K?) supplies DPMI itself, so cwsdpmi is
not needed, and never loaded.  (3.1 and 95 supply DPMI, anyway...)

-uso.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019