delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/01/15:57:37

X-Authentication-Warning: kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f
Date: Thu, 1 Feb 2001 14:54:36 -0600
From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
To: djgpp AT delorie DOT com
Subject: Re: newbie
Message-ID: <20010201145436.A5323@kendall.sfbr.org>
Mail-Followup-To: djgpp AT delorie DOT com
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010129082033 DOT 28507L-100000 AT is> <slrn97bapv DOT 4d2 DOT rpolzer AT rebounce DOT rpolzer-lx> <9597vh$n6u$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <20010131102557 DOT A2585 AT kendall DOT sfbr DOT org> <slrn97h0b8 DOT 63p DOT rpolzer AT rebounce DOT rpolzer-lx> <fa6h7tccjcav4n5vm3lg8jmuteja7egpst AT 4ax DOT com> <slrn97j4hv DOT sj DOT rpolzer AT rebounce DOT rpolzer-lx> <3405-Thu01Feb2001220124+0200-eliz AT is DOT elta DOT co DOT il>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <3405-Thu01Feb2001220124+0200-eliz@is.elta.co.il>; from eliz@is.elta.co.il on Thu, Feb 01, 2001 at 10:01:24PM +0200
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

-: 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 -


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