Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <4062B0AA.1000505@hhschmidt.de> Date: Thu, 25 Mar 2004 11:12:58 +0100 From: "H. Henning Schmidt" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: "test -c com1" hangs on some WinXP systems Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse AT kundenserver DOT de auth:e9b0f294f4b6d6da7efd4652948020da A question slightly besides your point ... but very interesting to me: What is the benefit of using /dev/ttyS0 instead of "com1" on Cygwin? Do you have a short explanation for me, or perhaps a pointer to some more detailed info? Thanks a lot, ;Henning On Wed, 24 Mar 2004, Curt, WE7U wrote: > Our application runs on multiple OS'es. A few of our WinXP users > (and perhaps Win2k, can't remember) have had "if test -c com1" hang > during our configure stage. > > We've already figured out that we should be using "/dev/ttyS0" > instead of "com1", and have switched to that. Because of the hang > we're trying "if test -d /proc/registry as the test". If > /proc/registry is found, we skip the file test for the serial device > on Cygwin boxes, thereby avoiding the hang. > > Excerpt (the version that hangs sometimes): > > > AC_DEFUN([XASTIR_DETECT_DEVICES], > [ > AC_MSG_CHECKING([for devices]) > if test -c com1 ; then > ac_tnc_port=com1 > ac_gps_port=com2 > elif test -c /dev/cuaa0 ; then > ac_tnc_port=/dev/cuaa0 > ac_gps_port=/dev/cuaa1 > > > New improved version: > > > AC_DEFUN([XASTIR_DETECT_DEVICES], > [ > AC_MSG_CHECKING([for devices]) > if test -d /proc/registry ; then > ac_tnc_port=/dev/ttyS0 > ac_gps_port=/dev/ttyS1 > elif test -c /dev/cuaa0 ; then > ac_tnc_port=/dev/cuaa0 > ac_gps_port=/dev/cuaa1 > > > Should "if test -c com1" or "if test -c /dev/ttyS0" work on Cygwin > across all Windows platforms it supports? > > We'd rather do "if test -c /dev/ttyS0" if possible, so that it's > similar across all platforms we support. -- H. Henning Schmidt email: henning AT hhschmidt DOT de phone: +49 (0) 6155 / 899 283 fax: +49 (0) 6155 / 899 284 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/