Mail Archives: djgpp-workers/1997/05/20/05:47:23
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 -