delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/15/11:59:47

Date: Thu, 15 May 1997 18:58:51 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Paul Campisi <pcampisi AT ececs DOT uc DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Exclusive access to drive
In-Reply-To: <199705121657.MAA13840@banana.ece.uc.edu>
Message-ID: <Pine.SUN.3.91.970515185357.10056E-100000@is>
MIME-Version: 1.0

On Mon, 12 May 1997, Paul Campisi wrote:

> 	You tried to do a system("chkdsk") and it worked???

Yes.

> I don't
> understand. I have gotten chkdsk errors when I try even a small program:
> 
> int main() {
> 	system("chkdsk");
> }
> Chkdsk runs, but causes errors. When I do this directly from command.com
> it works.

The above program worked for me just fine.  I changed it a bit (see 
below), but I don't think the difference is significant.
  
Can you run go32-v2 without arguments and post everything it prints?

> I believe you mentioned earlier that a DPMI swap file is opened and this
> might cause the error. Is there any way for me to close the swap file
> temporarily and reopen it after the system call?

No, you can't.  But on my machine this works even though the swap file is 
open, so I guess there's some other factor here.

Here's the program that works for me:

#include <stdlib.h>

int main (void)
{
  return system ("chkdsk");
}

- Raw text -


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