This is the mail archive of the cygwin-developers@cygwin.com 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]

Re: Bash chokes up on the tty mode when it terminates.


On Thu, Aug 23, 2001 at 04:13:13AM +0900, Kazuhiro Fujieda wrote:
>I found bash choked up on the tty mode when it terminated.
>I tested it on NT4 Sp6a with recent nightly snapshots and the
>latest CVS source. The concrete procedure is:
>1. Insert `set CYGWIN=tty' into the cygwin.bat.
>2. Start Cygwin Bash Shell
>3. Exit immediately from it.
>
>The strace log attached below shows it choked up just after
>it invoked kill_pgrp.

I believe that I've fixed this.  It was caused by Corinna's recent
changes to report a reasonable value when asking how many fds cygwin
can open.

The problem is that bash calls dup2 with the value it gets from
getdtablesize as the second argument.  Then dup2 aborted because the fd
was not within range -- which it shouldn't have done.  I added code
(from a net contributor, I believe) to cause dup2 to extend the fd table
as needed last year but I neglected to eliminate a prior bounds checking
test just before it.

Anyway, I checked in a trivial fix.

cgf


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