Mail Archives: djgpp/2001/02/01/15:57:37
-: So there's some other reason for the slowness.
I'd like to try to confirm some of this behavior with bash
as the primary shell.
I tried to load bash as my primary shell using the following
approach (suggested by Giacomo Degli Esposti) with DOS 5:
Compile this C program (sets the DOS PATH so bash and cwsdpmi
can be found, and then exec's bash.exe) and place the executable
in the root directory.
/* go-bash.c */
#include <stdio.h>
#include <stdlib.h>
#include <process.h>
#include <errno.h>
static char *args[]={"bash.exe","-login",NULL};
int main(void)
{
char *path;
path = getenv("PATH");
printf("prior path is %s\n",path);
putenv("PATH=c:\\djgpp\\bin");
path = getenv("PATH");
printf("posterior path is %s\n",path);
printf("spawning bash as login shell...\n");
return execvp("bash.exe",args);
}
/* end of go-bash.c */
I compiled the above using BCC:
bcc -mt -G- -O -c go-bash.c -ogo-bash.obj
tlink /t go-bash.obj,go-bash
then I changed the SHELL statement in CONFIG.SYS:
shell=c:\c\dj\go-bash.exe
On reboot I see the before/after PATH messages, then the machine
simply hangs. What have I overlooked?
- Raw text -