delorie.com/archives/browse.cgi | search |
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 <eblake AT redhat DOT com> |
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: | <A4AC3816FD34354F878DD1F440F3ABCE02284615 AT CINMLVEM24 DOT e2k DOT ad DOT ge DOT com> <AANLkTinZUAtd_g3XeSDQdPQJbqL64Cg3RsKXVtNvLH8y AT mail DOT gmail DOT com> <A4AC3816FD34354F878DD1F440F3ABCE02398679 AT CINMLVEM24 DOT e2k DOT ad DOT ge DOT com> <A4AC3816FD34354F878DD1F440F3ABCE02398DBD AT CINMLVEM24 DOT e2k DOT ad DOT ge DOT com> <A4AC3816FD34354F878DD1F440F3ABCE02418585 AT CINMLVEM24 DOT e2k DOT ad DOT ge DOT com> |
In-Reply-To: | <A4AC3816FD34354F878DD1F440F3ABCE02418585@CINMLVEM24.e2k.ad.ge.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 </dev/stdin But I now get "bash: /dev/= stdin: No such file or directory" >=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--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |