X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4BF6ABC3.1070304@redhat.com> Date: Fri, 21 May 2010 09:50:27 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.7.5: Bug with bash read in /etc/profile.d invocation References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD5D8C9F73C001534B9E4E5DC" X-IsSubscribed: yes 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 --------------enigD5D8C9F73C001534B9E4E5DC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 =20 > 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 p= rofile.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. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigD5D8C9F73C001534B9E4E5DC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL9qvDAAoJEKeha0olJ0NqROkH/1XtmHG1roP65QcmvIIZEXzs rzRzfpkUGKYcOsGTIH16TIOvutvhKxCnK1N3Cs2BFrqp6yzYyjWbtGhIDdw/vlpT O/5bnwgCid64alt9P5Bu8K0zzDC0Nz1588FOiIdfuGlBVlHkF6tBZbPF2yYC/Ye8 mIX7gq/9gBQvURwxcOvueUExpe8tk9PNy863KhlYusvv41pb8CxJxrzkew66EkpT 6UjAmHCCQZnMAVfLjebSkcakfLS+c/Fx9PrNrCPaWdSX/DUCm+ZHzgwVSmhiNTDg iceV7UnrxeQFqEB7joRUHSyzqKn+3HAPOfYNe+1b8KVqWZQfLZtXeq8B/5S8B4Q= =FBWi -----END PGP SIGNATURE----- --------------enigD5D8C9F73C001534B9E4E5DC--