Extra CR or LF when pressing return at bash prompt

Jason Anderson Jason.Anderson@pace.co.uk
Wed Oct 18 06:59:00 GMT 2000


Hello,
I'm relatively new to Cygwin so I apologise if this has been discussed before in a different guise, but I haven't been able to find a solution in the archives.
The following problem occurs when calling a standard Windows console application from within the cygwin bash shell, and does not seem to be a problem when calling "proper" Cygwin system tools.
The Windows application I'm trying to call prompts for various input data which it reads from stdin. From a DOS shell, this works well, but under Cygwin the first read from stdin is bypassed (as if the RETURN key was pressed) although the subsequent inputs work correctly. It seems as if pressing the RETURN key sends two key presses (CR and LF presumably), but that the shell only consumes one of these to start the program from bash. The other one is then used for the first input statement.
I can work around this by executing the command at the bash prompt by pressing CTRL-J rather than RETURN or CTRL-M.
Has anyone any ideas how to fix this properly, perhaps with a parameter to BASH or a change to "termcap". I have tried CYGWIN=binmode and nobinmode with no luck, and I have tried setting CYGWIN=tty, but this does not work (nor was it expected to after reading the mailing list archive).
Any suggestions?
Thanks,
Jason Anderson
Output from cygcheck is:
Cygnus Win95/NT Configuration Diagnostics
Current System Time: Wed Oct 18 14:39:10 2000
Win95 Ver 4.0 build 67306684 B
Path:	/c/perl/bin
	/c/Program Files/GNU/WinCvs 1.1
	/usr/bin
	/usr/local/bin
	/c/NOVELL/CLIENT32
	/c/WINDOWS
	/c/WINDOWS/COMMAND
	/c/UTILS/UTILS
	/c/PERL/BIN/
SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS
CYGWIN32 = `nobinmode'
CYGWIN = `nobinmode'
HOME = `/home/anders_j'
MAKE_MODE = `unix'
PWD = `/home/anders_j/tools/common'
USER = `anders_j'
!C: = `C:\cygwin\bin'
!Z: = `Z:\PUBLIC'
ASSET = `0184'
CMDLINE = `bash --login -i'
COMSPEC = `C:4円DOS6014円DOS.COM'
EDITOR = `vi'
HOSTNAME = `JASONANDERSON'
HOSTTYPE = `i586'
LANG = `en'
LANGUAGE = `english'
LC_ALL = `en_UK'
MACHTYPE = `i586-pc-cygwin'
NWLANGUAGE = `ENGLISH'
OLDPWD = `/home/anders_j/tools'
OSTYPE = `cygwin'
PROMPT = `$p$g'
PS1 = `\u:\w > '
SHELL = `/bin/sh'
SHLVL = `1'
ST20ROOT = `c:\stm\st20r1.7'
TEMP = `/c/temp'
TERM = `cygwin'
WINBOOTDIR = `C:\WINDOWS'
WINDIR = `C:\WINDOWS'
WINDOWS_LOGIN = `0'
_ = `/bin/cygcheck'
TZ = `GMTST0GMTDT-1,M3.5.0/2,M10.5.0/3'
Use `-r' to scan registry
a: fd N/A N/A 
c: hd FAT32 4110Mb 93% CP UN MINE
d: cd CDFS 11Mb 100% CP CPPBIBSC
f: net OS2 36780Mb 98% CP FC TECHNICAL
g: net OS2 41344Mb 91% CP FC TECHSHARE
h: net OS2 41344Mb 91% CP FC TECHSHARE
j: net OS2 6000Mb 83% CP FC APPS
s: net OS2 41344Mb 91% CP FC TECHSHARE
u: net NTFS 2047Mb 0% CP CS UN PA FC Tcad
z: net OS2 3000Mb 70% CP FC SYS
C:\cygwin\bin /usr/bin system textmode
C:\cygwin\lib /usr/lib system textmode
C:\cygwin / system textmode
c: /c user textmode
Found: C:\cygwin\bin\bash.exe
Found: c:\UTILS\UTILS\bash.exe
Warning: C:\cygwin\bin\bash.exe hides c:\UTILS\UTILS\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: c:\UTILS\UTILS\cat.exe
Warning: C:\cygwin\bin\cat.exe hides c:\UTILS\UTILS\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: c:\UTILS\UTILS\find.exe
Warning: C:\cygwin\bin\find.exe hides c:\UTILS\UTILS\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: c:\UTILS\UTILS\gcc.exe
Warning: C:\cygwin\bin\gcc.exe hides c:\UTILS\UTILS\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: c:\UTILS\UTILS\gdb.exe
Warning: C:\cygwin\bin\gdb.exe hides c:\UTILS\UTILS\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: c:\UTILS\UTILS\ld.exe
Warning: C:\cygwin\bin\ld.exe hides c:\UTILS\UTILS\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: c:\UTILS\UTILS\ls.exe
Warning: C:\cygwin\bin\ls.exe hides c:\UTILS\UTILS\ls.exe
Found: z:\PUBLIC\ls.exe
Warning: C:\cygwin\bin\ls.exe hides z:\PUBLIC\ls.exe
Found: C:\cygwin\bin\make.exe
Found: c:\UTILS\UTILS\make.exe
Warning: C:\cygwin\bin\make.exe hides c:\UTILS\UTILS\make.exe
Found: C:\cygwin\bin\sh.exe
Found: c:\UTILS\UTILS\sh.exe
Warning: C:\cygwin\bin\sh.exe hides c:\UTILS\UTILS\sh.exe
Found: \bin\sh.exe
Warning: C:\cygwin\bin\sh.exe hides \bin\sh.exe
 83k 2000年06月11日 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
 "cygitcl30.dll" v0.0 ts=2000年6月11日 4:34
 35k 2000年06月11日 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
 "cygitk30.dll" v0.0 ts=2000年6月11日 4:34
 402k 2000年06月11日 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
 "cygtcl80.dll" v0.0 ts=2000年6月11日 4:30
 5k 2000年06月11日 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
 10k 2000年06月11日 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
 "cygtclreg80.dll" v0.0 ts=2000年6月11日 4:30
 639k 2000年06月11日 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
 "cygtk80.dll" v0.0 ts=2000年6月11日 4:34
 586k 2000年08月04日 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
 "cygwin1.dll" v0.0 ts=2000年8月4日 1:53
 Cygwin DLL version info:
 dll major: 1001
 dll minor: 4
 dll epoch: 19
 dll bad signal mask: 19005
 dll old termios: 5
 api major: 0
 api minor: 26
 shared data: 3
 dll identifier: cygwin1
 mount registry: 2
 cygnus registry name: Cygnus Solutions
 cygwin registry name: Cygwin
 program options name: Program Options
 cygwin mount registry name: mounts v2
 build date: Thu Aug 3 20:53:46 EDT 2000
 CVS tag: cygwin-1-1-4
 shared id: cygwin1S3
Use -h to see help about each section
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


More information about the Cygwin mailing list

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