delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/05/20/05:47:23

Date: Tue, 20 May 1997 11:43:37 +0200 (METDST)
From: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
To: "John M. Aldrich" <fighteer AT cs DOT com>
Cc: DJGPP Workers Mailing List <djgpp-workers AT delorie DOT com>
Subject: Re: Bugfix for redir.c
In-Reply-To: <337B8C14.3403@cs.com>
Message-Id: <Pine.HPP.3.95q.970520113905.14749C-100000@newton.mathematik.tu-chemnitz.de>
Mime-Version: 1.0

On Thu, 15 May 1997, John M. Aldrich wrote:

> There's a bug in the code for redir from DJGPP v2.01 that causes

Because I forgot to take your patch at home, I couldn't look at it.
But thought about the problem and I think, I found a much smaller
patch, which does exactly the same. It uses the '__dosexec_in_system'
variable (I found this when I looked at the system function).

*** src/utils/redir.c~	Wed Jul 12 04:06:50 1995
--- src/utils/redir.c	Sun May 18 11:30:46 1997
***************
*** 26,31 ****
--- 26,32 ----
  #include <unistd.h>
  #include <errno.h>
  #include <crt0.h>
+ #include <libc/dosexec.h>
  
  int _crt0_startup_flags = _CRT0_FLAG_DISALLOW_RESPONSE_FILES;
  
***************
*** 151,157 ****
--- 152,160 ----
      argv++;
    }
  
+   __dosexec_in_system = 1;
    rv = spawnvp(P_WAIT, argv[1], argv+1);
+   __dosexec_in_system = 0;
    if (rv < 0)
      fatal("Error attempting to run program %s\n", argv[1]);
  

*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post:    Am Berg 3, D-09573 Dittmannsdorf                     *
* e-Mail:  Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE              *
* WWW:     http://www.tu-chemnitz.de/~rho                       *
*****************************************************************

- Raw text -


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