Help required - Connecting bash to an editor using anonymous pipes

Jeff Sturm jsturm@sigma6.com
Fri Oct 2 23:57:00 GMT 1998


Easy answer: use "bash -i". By default bash runs in interactive mode if
stdin is a tty device, otherwise it runs in non-interactive mode (i.e.,
it does not generate a prompt or echo the command line). Specifying
"-i" simply overrides the default.
Jonathan Naughton-Green wrote:
>> Hi,
>> If anybody can throw some light onto running a "bash" session through a
> pipe then I would appriciate it. I have sifted through the archieves but
> have not (as yet) found anything that answers my question - (are those
> archives big !!)
>> I am trying to connect the Cygnus environment to a MicroEmacs editor to
> run a Cygnus shell in one of the buffer windows. I can do this with the
> "command.com" to give me DOS prompt in a buffer, however applying the same
> technique to "bash" it does not quite work.
>> The window comes up. I can send characters to the shell and I can execute
> commands and see the results in the buffer BUT the bash prompt and the
> characters that I type into the buffer are not visible.
>> Basically all I have done is get MicroEmacs to prepare the environment
> (i.e. pushed the cygnus.bat set up in the environment) created anonymous
> pipes for stdin, stdout and stderr which connect to MicroEmacs and then
> spawned off a new process "bash" (directly).
>> I am a bit baffled by this because I had assumed that the bash prompt
> would be on stdout. Because I can read the output of commands such as
> "ls", "make" etc which appear on stdout and stderr then I must assume
> that bash itself is doing something else - but what ??
>> I have also assumed that bash will execute correctly when served up with
> a set of pipes as it's stdin/out/err - this might not be the case.
>> I'm running Cygwin 19.1 on Windows '98.
>> MicroEmacs (jasspa) is from
>> http://www.geocities.com/ResearchTriangle/Thinktank/7109/
>> + latest patch + a few hacks of my own on the launching of processes.
> I am building under MSVC 5.0 (not sure if I can build this as a
> cygwin executable as a windows app ??)
>> Regards
> J.Naughton-Green
>> --
> ______________________________________________________________________
>> J.D.Naughton-Green
>> SAMSUNG Electronics Ltd
> Samsung Electronics Research Institute (Audio / Visual Labs)
> _______________________________________________________________________
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".

-- 
Jeff Sturm
jsturm@sigma6.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /