X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,TO_NO_BRKTS_PCNT X-Spam-Check-By: sourceware.org Date: Wed, 4 Apr 2012 08:23:05 +0200 From: Denis Excoffier To: cygwin AT cygwin DOT com Subject: getpass and /dev/tty Message-ID: <20120404062329.GA3700@qp9482> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hello! Would it be possible that getpass() first reads on /dev/tty before defaulting to stdin? % uname -a CYGWIN_NT-5.1 edited 1.7.12(0.260/5/3) 2012-04-03 10:24 i686 Cygwin % ls /dev/tt* /dev/tty /dev/ttyS0 /dev/ttyS2 /dev/ttyS3 % cat foo.c #include #include int main () { fprintf (stderr, "Press to continue . . .\n"); getpass (""); return 0; }; % gcc -O -o ./foo foo.c % ./foo Press to continue . . . [here you press Return] % ./foo < /dev/null Press to continue . . . % [for the second run of ./foo, you cannot press Return] Regards, Denis Excoffier. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple