Thanks. /dev/tty works. It's a script that I inherited. Just trying to keep it working until we can eliminate it.
Dave -----Original Message----- From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On Behalf Of Eric Blake Sent: Friday, May 21, 2010 11:50 AM To: cygwin@cygwin.com Subject: Re: 1.7.5: Bug with bash read in /etc/profile.d invocation On 05/21/2010 09:20 AM, Garber, Dave (GE Infra, Energy, Non-GE) wrote: > Anyone have an ideas? I'm stumped. Please don't top-post. http://cygwin.com/acronyms/#TOFU > OK, I changed my script to have: > read -p "How are you today? " Ans </dev/stdin But I now get "bash: /dev/stdin: No such file or directory" > > Since profile is redirecting stdin & stdout, wouldn't it make more sense for profile to redirect stdin and stdout back to normal when sourcing the profile.d scripts? If stdin is redirected, then /dev/stdin points to that redirected location. Don't you instead want to read from the controlling terminal, /dev/tty? But seriously, trying to do _anything_ interactive in your startup scripts is a recipe for disaster. You are very likely to cause yourself an inability to ssh in to your machine, when the login script outputs data or blocks waiting for input. Startup scripts are supposed to be silent, neither producing nor consuming data, in a typical setup. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- 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