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

From: "Sander Pool" <sander DOT biteme AT biteme DOT sanders-stuff DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: call to 'open' causes all sleeping drives to awaken!
Date: Tue, 18 Feb 2003 20:25:44 -0800
Organization: http://extra.newsguy.com
Lines: 33
Message-ID: <b2v0tc02dt0@enews4.newsguy.com>
NNTP-Posting-Host: p-375.newsdawg.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie 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.

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


- Raw text -


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