delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/14/18:24:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs
Date: Tue, 14 Oct 2003 17:23:04 -0500 (CDT)
From: Brian Ford <ford AT vss DOT fsi DOT com>
X-X-Sender: ford AT eos
To: cygwin AT cygwin DOT com
Subject: Re: cygpath hangings
In-Reply-To: <Pine.GSO.4.56.0310141657410.823@eos>
Message-ID: <Pine.GSO.4.56.0310141715350.823@eos>
References: <20031014100230 DOT A12215 AT fw DOT j-son DOT org> <006501c392b7$dc780730$200aa8c0 AT thorin>
<3F8BE1B9 DOT 3000704 AT cs DOT york DOT ac DOT uk> <Pine DOT GSO DOT 4 DOT 56 DOT 0310141657410 DOT 823 AT eos>
MIME-Version: 1.0

On Tue, 14 Oct 2003, Brian Ford wrote:

> On Tue, 14 Oct 2003, chris wrote:
>
> > If I comment out the call to SHGetPathFromIDList in this program, the
> > program returns, else it hangs.
> >
> Confirmed.
>
> > Also, This program seems to be both valid c++ and c code. If it is
> > compiled in gcc, all is fine. In g++, it hangs.
> >
> Really?  I see the hang regardless.
>
It is also valid -mno-cygwin code, and when compiled this way, it still
hangs.  Doesn't this eliminate a good portion of the Cygwin startup code
since this is a MINGW executable?

It must be something the exec stub did?  I do see a few cases of suspended
starting in spawn_guts.  Might it have forgotten to resume?  Is there an
easy way to tell if it is suspended?

I'm still puzzled about why the input redirect helps.  Recap:

/etc/postinstall/hang.sh:

#!/bin/bash

FOO=`hangprog.exe < /dev/null`
BAR=`hangprog.exe` # hangs here!

where hangprog.exe is:

> > -- Code begins --
> >
> > #include <shlobj.h>
> >
> > void fee (void) {
> >   char *buf;
> >
> I changed this to char buf[255] just to be safer.
>
> >   LPITEMIDLIST id;
> >   SHGetPathFromIDList (id, buf); // Comment this out and no hang.
> > }
> >
> > int main (int argc, char **argv)
> > {
> >     return 0;
> > }
> >

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019