delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/20/17:48:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sun, 20 Oct 2002 18:54:07 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <126296343289.20021020185407@familiehaase.de>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin Here power toy
In-Reply-To: <5.1.0.14.2.20021020080704.01fdb3a0@pop3.cris.com>
References: <3DB2B34F DOT 2050302 AT upb DOT de>
<5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20021020080704 DOT 01fdb3a0 AT pop3 DOT cris DOT com>
MIME-Version: 1.0
X-Sender: 320081107336-0001 AT t-dialin DOT net

Hallo Randall,

Am Sonntag, 20. Oktober 2002 um 17:13 schriebst du:

> Andrew,

> At 06:58 2002-10-20, Andrew Ellerton wrote:
>> >> @="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash 
>> -rcfile ~/.bashrc\""
>> >
>> >can you think of any better way to start bash?
>> >the above creates two bash.exe in memory:
>> >one executing /etc/profile and the cd-command
>> >and one showing the prompt.
>>
>>The first shell executes a single line of shell commands, namely to change 
>>directory and run another shell. The second shell runs as the "normal" 
>>interactive shell. Net effect - looks like the shell has started in a 
>>different directory. Admittedly a bit hacky, having two shells running for 
>>no good reason, but it does the job. I'm not sure if shells are very 
>>expensive in terms of memory. If not, then its a bit kludgey, but 
>>otherwise its ok.

> There are not (ever) two shells running as a result of invoking this 
> command string. The second one overlays the first in the same process. 
> That's what the "exec" built-in of the shells does.

But I get to see two bash processes with different PID's in the
Taskmanager.  However, 'ps -e' shows only one...


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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