delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/11/29/13:00:09

Message-Id: <199611291755.CAA19783@mail.st.rim.or.jp>
From: "Daisuke Aoyama" <jack AT st DOT rim DOT or DOT jp>
To: "DJGPP WORKERS" <djgpp-workers AT delorie DOT com>
Subject: DPMI selectors under Win95
Date: Sat, 30 Nov 1996 02:30:03 +0900
MIME-Version: 1.0

After calling spawnXX (about 2000 times) I got this message and  it
crashed DOS box.

    Load error: no DPMI selectors

I found the parent process lost 4 selectors each time it called spawnXX.
(Under NT4.0 it lost more.)
Here is crash code.
-------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <process.h>

int
main (int argc, char *argv[])
{
  int i;
  char buf[32];

  if (argc == 1)
    {
      for (i = 0; i < 10000; i++)
	{
	  sprintf (buf, "%d", i);
	  spawnlp (P_WAIT, argv[0], argv[0], buf, NULL);
	}
    }
  else
    {
      i = strtol (argv[1], NULL, 10);
      i++;
      printf ("%s:%d\n", argv[0], i);
    }

  return 0;
}
-------------------------------------------------------
Under MS-DOS 6.2 + CWSDPMI it works fine.
Does anybody have ideas ?

Daisuke Aoyama
jack AT st DOT rim DOT or DOT jp

- Raw text -


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