This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xemacs shell problem


On Fri, 14 May 2004, Levent Yilmaz wrote:

> Hi!
>
> After posting this message to emacs.xemacs.windows and following the
> advices I have been told, I found out that this happens only with Xemacs
> Cygwin build. Thus, I hope it would be a relevant discussion for this
> group.
>
> *the problem setting*
> The shell-mode(using bash) at Xemacs(21.4.15) called from Bash
> (2.05b.0(1)-release) running Cygwin(1.42) on WindowsXP-SP1
>
> *the ISSUE*
> Error messages from certain Windows console programs (such as the
> Fortran compilers LaheyF95 and Compaq Visual Fortran 6.6) (hereafter I
> will refer these as Compiler) are not displayed at the shell-buffer.
> Instead the errors are flushed to a DOS console that dissappears
> immidiately after the compilation is finished and the regular messages
> (logo and stuff) are displayed at the shell-buffer as usual.
>
> *complications*
> - When the Compiler is invoked directly from Bash, everything works
> fine, all messages are there and in fact, output redirection works as
> expected. The error mesages can be redirected with the usual 2>myfile.
> - This issue does not occur with all console applications (for instance
> I tried with MSVC++6/7 and they are working fine).  Among the ones I
> tested, only these fortran Compilers has this behaviour. This is also
> why I fail to find a reproducible example for submitting as a test case
> here (though, you may download a trial version from
> http://www.lahey.com/ and test with a erroneous Fortan code, if you
> really agree that this is a significant issue and worth the trouble).
> Here is a sample failing FORTRAN code
> !======================
> program fail
> end program nail
> !======================
> - As I mentioned before this problem happens only with Xemacs Cygwin
> build. Native-Windows build is working fine.
>
> My question is, it seems that the output from the Compiler is flushed to
> that blinking console, what may be the cause of this? Are there other
> outputs other than STDERR and STDOUT, that Cygwin is handling properly,
> but the shell-mode in Xemacs is failing?
>
> Thank you so very much!!
> - Levent

Cygwin uses special pipes, called "pty"s, for applications that aren't
running in a console.  I'm guessing that XEmacs uses these ptys for its
shell buffer.  Some applications detect that they are not invoked from a
console, and allocate one.  If the applications don't attempt to be
smarter, Cygwin has no problems redirecting their output.  The reason the
problem doesn't show up in a "bash window" is that bash is already runs in
a console.

If you have the same problem running from within a terminal, like rxvt or
xterm, I'd suspect that the problem application does exactly that --
allocates a console when run from a pty, which is what causes the flashing
console with error messages.

There have also been some fixes related to pty-handling and Windows
console applications, but I don't recall whether they've made it to the
current release (1.5.9), so search the mailing list archives or just try
the latest snapshot to see if it helps.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]