www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/24/13:15:23

From: "John Lee" <leej AT logica DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <wkbm6.226404$Pm2 DOT 3670275 AT news20 DOT bellglobal DOT com> <CScm6.227001$Pm2 DOT 3684848 AT news20 DOT bellglobal DOT com>
Subject: Re: Eradicating djgpp W2000 problem
Date: Tue, 24 Apr 2001 13:26:26 +0100
Organization: Logica
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <988132058.678510@ernani.logica.co.uk>
Cache-Post-Path: ernani.logica.co.uk!unknown AT 158 DOT 234 DOT 67 DOT 183
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
Lines: 89
NNTP-Posting-Host: ernani.logica.co.uk
X-Trace: 988132058 reading.news.pipex.net 15023 193.123.204.68
X-Complaints-To: abuse AT uk DOT uu DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

the win2000 problems with the dos simulator which stop make working really
are a pain- I've emailed Bill Gates about it...no replyn yet!  What about
other people trying this tactic. It is M$ who should fix it! If it's w2000
speciffic ie ok with NT 4 then they should be able to fix it easily... so
everyone get emailing ...John

"Michael Allison" <michael DOT allison2 AT sympatico DOT ca> wrote in message
news:CScm6.227001$Pm2 DOT 3684848 AT news20 DOT bellglobal DOT com...
> "Michael Allison" <michael DOT allison2 AT sympatico DOT ca> wrote in message
> news:wkbm6.226404$Pm2 DOT 3670275 AT news20 DOT bellglobal DOT com...
> >
> > Let's constructively try to come up with the absolute minimum set
> > of two programs that can cause the problem to occur, as a start
> > to understanding it.
>
> There is obviously more to reproducing this problem than
> nesting djgpp programs as people claim.  The code below
> went to 6 levels of nesting fine on Windows 2000 professional.
>
> So where do we go from here?
>
> /* djgpp toplevel test program for isolating
>    Windows 2000 problem */
> #include <stdlib.h>
> #include <assert.h>
> #include <string.h>
> #include <process.h>
>
> char *default_shell = "command.com";
> static int execute_by_shell;
> int dos_status;
> int proc_return;
> int nesting_level = 0;
>
> #define CMDBUFSIZ 200
> char *parentenv[] =
> {
>    "PARENT1=environment will be",
>    "PARENT2=passed to child process",
>    (char *)0
> };
>
> char nestval[CMDBUFSIZ];
>
> char *args[] = {
>    "parent.exe",
>    nestval,
>    (char *)0
> };
>
>
> int main(int argc, char *argv[])
> {
>     char mycmdline[CMDBUFSIZ];
>     execute_by_shell = 0;
>
>     if (argc > 1)
>  nesting_level = atoi(argv[1]);
>     nesting_level++;
>     if (nesting_level > 6) return 0;
>     (void) itoa(nesting_level, nestval, 10);
>
>     printf("\nIn child, nesting level %s\n",
>   nestval);
>
>     if (execute_by_shell) {
>  char *cmdline = mycmdline;
>  (void) strncpy(mycmdline, argv[0],
>    CMDBUFSIZ - (sizeof(nesting_level) + 1));
>  (void) strcat(mycmdline, " ");
>  (void) strcat(mycmdline, nestval);
>  proc_return = system (cmdline);
>     } else {
>  proc_return = spawnvpe (P_WAIT, args[0], args, parentenv);
>     }
>     /* If the child got a signal, dos_status has its
>        high 8 bits set, so be careful not to alter them.  */
>     if (proc_return == -1)
>  dos_status |= 0xff;
>     else
>  dos_status |= (proc_return & 0xff);
>     return dos_status;
> }
>
>
>
>


- Raw text -


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