delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/02/19:58:13

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
From: "Nikolas Kauer" <nk AT nkauer DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Xterm input problem
Date: Mon, 3 Mar 2003 00:57:08 -0000
Message-ID: <NPEOIEMHLKEPCDPPJNHGIEMKCCAA.nk@nkauer.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Hi,

I boiled my problem down to the following Fortran test program,
which I always ran in an Xterm under Xwindows and in a cygwin.bat terminal
(without closing X, same behavior unless otherwise noted).
I'm using only default packages of the cygwin 1.3.20 distribution
except for fvwm-themes 0.6.2 and fvwm-2.4.14, which were compiled
from source.

Test program:
--------
      program readtest
      integer i(40000000)
      character*80 process
      read (*,'(a)') process
      write(*,'(a)') process
      end
--------             
compiled with 'g77 -g readtest.f'.  With array size 40000000
the program runs as expected, for example:
--------
$ a.exe 
asdf   (<----- this is the user input)
asdf    
$
--------

Then, I change 40000000 to 41000000 in the source code
and recompile with 'g77 -g readtest.f'.  Now the executable
does not stop to solicit input, but returns immediately:
--------
$ a.exe 
$
--------

Having read about stack size problems with large arrays
under Cygwin, I recompile with 'g77 -g -Wl,--stack,0x2000000 readtest.f' 
and run again.  First I run in the Xterm and get:
--------
$ a.exe
fmt: end of file
apparent state: unit 5 (unnamed)
last format: (a)
lately reading sequential formatted external IO
Aborted (core dumped)
--------
Secondly, I run it in the Cygwin terminal, i.e. bash in Win window and
-- surprise -- it runs as expected:
--------
$ a.exe 
asdf   (<----- this is the user input)
asdf    
$
--------

Can anybody explain this and suggest a remedy?

Any help would be greatly appreciated!


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